0
I have been trying to download "jdk-8u211-linux-x64.tar.gz" from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html? with the below command. The file gets downloads but not the correct one. As when I do file jdk-8u221-linux-i586.tar.gz
it is showing as html file.
command: wget --user=*** --password=******* --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn/java/jdk/8u221-b11/230deb18db3e4014bb8e3e8324f81b43/jdk-8u221-linux-x64.tar.gz"
And when I try to unzip it using tar -xvzf jdk-8u221-linux-i586.tar.gz
I get below error:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
You are getting the HTML file because typically you have to agree to their license before downloading. You might want to look at how the
webupd8.org
people do it for their apt based installer. – ivanivan – 2019-08-01T13:10:08.600Actually, @ivanivan, Oracle locked down the Java downloads and doesn't let anyone, including WebUpd8, download it outside of their approved flow.
– Deltik – 2019-08-01T13:12:02.857@Deltik good to know, think you ought to add a little more and make it an Answer. – ivanivan – 2019-08-01T13:12:36.287
@ivanivan: Sure, here's an answer.
– Deltik – 2019-08-01T13:18:39.723@mansing shinde: Here is how to do it (at least it worked for me): https://stackoverflow.com/a/10959815/2184122
– Robert Lugg – 2020-01-07T19:08:58.773