Issue
I need to build my application using Java 11.
However the dropdown menu stops at Java 9.
What do I do? OpenJDK is acceptable too.
I'm on the latest version of Jenkins.
Edit: as of now I've downloaded the binaries using wget
, extracted them on the machine, and added a JDK JDK_HOME
entry via Global Configurations.
Solution
I guess you are using the JDK Tool Plugin.
Click "Manage Jenkins" > "Global Tool Configuration" > "Add JDK" (near JDK installations)
Delete the java.sun.com installer. Just click "Add Installer" below and choose "Extract .zip/.tar.gz"
Enter following:
Label: openjdk-11
Download URL: https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz
Subdirectory of extracted archive: jdk-11.0.1 (Optional subdirectory of the downloaded and unpacked archive to use as the tool's home directory.)
And "Save" the configuration
=> Use JDK label (openjdk-11) in your build job.
The download-link given above appears to be from a time when java 11 hadn't entered LTS;
Instead go to Java Platform, Standard Edition 11 Reference Implementations which will provide you the download-link to the most recent release of the...
[...] official Reference Implementation for Java SE 11 (JSR 384) [...] based solely upon open-source code available from the JDK 11 Project in the OpenJDK Community. This Reference Implementation applies to both the Final Release of JSR 384 (Sep 2018) and Maintenance Release 1 (Mar 2019).
... which as of this writing is: https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz
Answered By - kasul