Using OpenJDK 14 in Jenkins

Generally, you can install the “Jenkins AdoptOpenJDK installer Plugin

Then in your Global Tool Configuration | Add JDK (${JENKINSURL}/configureTools/), you will

  • Add JDK
  • tick install automatically
  • Delete Installer (thereby removing the default Oracle installer)
  • Add Installer
  • Install from adoptOpenJDK.net
  • Save

If you have more than one JDK installed, in your jobs, you should now have an option to choose JDK or specify in the pipeline tools section.

Alternatively, you can just specify the path to where JDK14 is installed beforehand instead of dynamically installing.

It would seem you have the “installed beforehand” part done, but are missing the Global tool configuration, setting the path for jdk-14, so it’s not overriding the SYSTEM default.

JDK Global tool config

(obviously, pick from drop down or set path).

Leave a Comment