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.
(obviously, pick from drop down or set path).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…