Download Oracle JDK with single command

Today I want to show you how to download JDK with one single command. Yes, because if you want to get java from oracle web site you have to accept license before start the download.

If you want to don't want to use browser and you have to get it from command line you can use

# curl -LO ${URL} -H "Cookie: oraclelicense=accept-securebackup-cookie" 

where {URL} can be:

  • http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz for JDK 8
  • http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.tar.gz for JDK 7

Nessun commento:

Posta un commento