Downloading jdk from oracle download web page requires passing a cookie with request header.
The template:
curl -LO ${URL} -H "Cookie: oraclelicense=accept-securebackup-cookie"
Java 8
curl -LO http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz -H "Cookie: oraclelicense=accept-securebackup-cookie"
Java 7
curl -LO http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.tar.gz -H "Cookie: oraclelicense=accept-securebackup-cookie"
Java 9 - early access
curl -LO http://www.java.net/download/jdk9/archive/b44/binaries/jdk-9-ea-bin-b44-linux-x64-23_dec_2014.tar.gz -H "Cookie: oraclelicense=accept-securebackup-cookie"
Alternatively you can use wget command
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz
Brak komentarzy:
Prześlij komentarz