14/07/2015

[Oracle] wget or curl binaries from OTN website

Usually when you try to download Oracle's JDK or Oracle's DB driver jars you need to manually accept a license agreement before you are allowed to download them.

This obviously is not possible to do when trying to get those resources using wget or curl, but you can work around this by adding a cookie to your request saying that you do accept the licence:

wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "RESOURCE URL"

Where RESOURCE URL for latest JDK7 for example is: http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz

If you do not do this, you'll just download a file saying that you need to accept the licence instead

No comments:

Post a Comment

With great power comes great responsibility.

Da grandi poteri derivano grandi responsabilità.