2

I'm attempting to install the Java JDK through the command line using WGET on (no desktop).

Here is the picture I took. The file that was downloaded was not the tar ball of the JDK:

How can I download it via WGET?

enter image description here

1
  • Unless something has changed the links on Oracles site are generated -per session-. So the link you generated from one machine will not download from a different machine using wget, since the oracle website has no clue who the new session is and why it has links from a different session. I manged to work around this in the past by downloading from the machine that generated the link and then uploaded to the linux/unix box via SCP.
    – Tim
    Jul 24 '13 at 19:55
2

If you see the resulting file the output it downloads a file of type: text/html. If you open the resulting file, you will find that it has in it's content the following:

"Network you must agree to the OTN license terms."

Which is what you have to do during webpage browsing.

But a quick google search I found this:

wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-7u17-download-1501626.html;" http://download.oracle.com/otn-pub/java/jdk/7u17-b02/jdk-7u17-linux-x64.rpm --no-check-certificate -O jdk-7u17-linux-x64.rpm

Source

1
  • change the file name for the correct one ... it's a example of a working command.
    – BitsOfNix
    Jul 24 '13 at 20:00
2
$ wget --no-cookies --no-check-certificate \
     --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" \
     "http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.rpm

Substitute your URL into the example above.

References

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.