wget for Oracle JDK is broken
926690Mar 27 2012 — edited Apr 14 2012Sometime over the weekend, Oracle broke the ability to use wget from the command line to retrieve the JDK.
I tested this multiple times over the past two weeks as we were refining our VM build process.
This worked for JDK 1.6.0_31:
wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64.bin
And this worked for JDK 1.7.0_03:
wget http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz
Now both of those wget commands return a small HTML file that states:
"In order to download products from Oracle Technology Network you must agree to the OTN license terms."
and
"Be sure that...
Your browser has "cookies" and JavaScript enabled.
You clicked on "Accept License" for the product you wish to download.
You attempt the download within 30 minutes of accepting the license."
Short of writing a script that will go to the main download page, accept the license, and then use the resulting cookie for the wget of the actual file, there is now no way to automate installation of the Oracle JDK on Linux.
If Oracle's goal is to drive all of us to use the OpenJDK, they're doing a good job.
Has anyone figured out a work-around for this? Or written a Ruby script to agree to the license and then use the cookie to get the file?