Linux command line download JDK

Source: Internet
Author: User

Official website JDK7 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

There are various system JDK in it, I downloaded the Linux x64 rpm format.

Command Wget-c-p/root/downloads http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.rpm

However, the command will now be a use of '--no-check-certificate ' Error, the online check is due to the HTTPS certificate, the following command changed to the following:

Wget-c-p/root/downloads--no-check-certificate http://download.oracle.com/otn-pub/java/jdk/7u71-b14/ jdk-7u71-linux-x64.rpm

The download is successful, but the download is not the 121M rpm file I want, but a 5k HTML file, what is the reason, so I directly

http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.rpm on the local browser to download, there is also a hint that the cookie is not normal HTML page.

At this point I realized that the anti-theft chain was caused by the cookie, so I opened the Fidder browser monitoring software locally, and the browser entered http://www.oracle.com/technetwork/java/javase/downloads/ jdk7-downloads-1880260.html, and then click Download Connection, in Fidder view the cookie for this connection is s_nr=1420682671945; S_cc=true; Oraclelicense=accept-securebackup-cookie; gpw_e24=http%3a%2f%2fwww.oracle.com%2ftechnetwork%2fjava%2fjavase%2fdownloads%2fjdk7-downloads-1880260.html; s_sq=%5b%5bb%5d%5d

So I changed the order again:

Wget-c-p/root/downloads--no-check-certificate--no-cookie--header "cookie:s_nr=1420682671945; S_cc=true; Oraclelicense=accept-securebackup-cookie; Gpw_e24=http%3a%2f%2fwww.oracle.com%2ftechnetwork%2fjava%2fjavase%2fdownloads%2fjdk7-downloads-1880260.html;s_ sq=%5b%5bb%5d%5d "http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.rpm

OK, it can be downloaded to rpm correctly.

Linux command line download JDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.