JdkGet is a Java utility that allows you to download Linux/OSX/Windows JDKs from Oracle, and extract them in arbitrary directories in a fully automated way.
To install a JDK you can use something like the following:
JdkGetter getter = JdkGetter.builder()
.version("1.8.0_92-b14")
.outputDirectory(jdkDirectory)
.build();
getter.get();
You can find a list of available JDKs here.
By using this utilitiy you agree to the Oracle Binary Code License Agreement for Java SE.
To build JDKGet use the Maven Wrapper script provided with the project:
./mvnw clean install
Testing downloads of all versions can be performed using it
profile and providing your OTN credentials:
mvn clean verify -Pit -Djdkget.otn.username=<otnUsername> -Djdkget.otn.password=<otnPassword>
The result will produce a shaded JAR in the target/
directory which can we executued using java -jar jdkget-${version}.jar
Downloads and extracts a .tar.gz, simple and easy
This will retrieve the Java equivalent of a turducken: the GZipped CPIO files of the JDK, wrapped in an XAR file, inside an HFS disk image. Can't we just use TarGz files? No, no, that would be too easy.
Similar to OSX, but with tools.zip (with some jars pack200'd) in CAB in EXE in EXE.