wget/curl download of Oracle Java 7 SDK from the Oracle Archive page

wget has worked with the otn-pub link up until recently.It does seem that Oracle has changed something.

The closest workaround is to wget from another site that host it

wget http://ftp.osuosl.org/pub/funtoo/distfiles/oracle-java/jdk-7u80-linux-x64.tar.gz

This curl command works for me:

curl -v -O -L -b oraclelicense=accept-securebackup-cookie http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-i586.rpm

options:

  • -v - just display additional info and HTTP headers on STDERR (you can skip this) or use -s for silent run
  • -O - save response to disk (instead of sending it to STDOUT) or use -o filename to specify another path
  • -L - follow redirects
  • -b - enable cookie engine and pass in initial cookie oraclelicense=accept-securebackup-cookie

The URL is lifted straight from the Oracle JDK download page


The oracle site asks you to login if you try to download JDK 7 from their archive. Hence the issue with the curl and wget. This is a recent change hope they can change this.

Note: Oracle has changed their licensing policy so check that before you move ahead. Your JDK may not be free anymore

Tags:

Java

Curl

Wget