How to set the available JDK versions?

Issue

  • There is no longer an option to choose specific Java versions in Jenkins jobs.
  • How do I add java 1.8 in the SDK dropdown? 

Environment

  • CloudBees Jenkins Enterprise

Resolution

This can happen if you have one or less JDK configured in the global Jenkins configuration.

  • If there is no JDK configured in the global options, Jenkins will default to use whatever is available on PATH.
  • If there is one JDK configured in the global options, Jenkins will implicitly use that one.
  • If there are 2+ JDKs configured in the global options, Jenkins will use whatever is configured in the job, defaulting to use what’s on PATH (the UI option is called “(Default)”). 

It’s generally best to always have at least two JDKs provided globally, as there can be unexpected behavioral changes in your jobs when going from 1 to 0 or 2+ JDKs otherwise.

You can set the Java Versions available Globally through https://$JENKINS_URL/configure

jdk.png

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.