How to Download JDK in CentOS / RHEL and Auto Accept License Agreement

Recently as I was about to update a JDK on my Linux box (CentOS), the command wget couldn't get thru, it's receiving a 302 error. Browsing Oracle's download site, it has now a radio-button to accept / decline the License Agreement.

Here's a workaround to bypass that. Issue the following command (make sure you replace the correct version of the JDK you're downloading).


 wget --no-cookies --header "Cookie: gpw_e24=http%3A#2F#2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u5-b05/jdk-7u5-linux-x64.tar.gz"

No comments:

Post a Comment