How to change the JDK for a Jenkins job?

For existing jobs you're editing, the JDK drop-down choice may not be available if you've just added a single JDK config in the 'Configure System' Jenkins settings.

However, it is available for new jobs.

Surprisingly, if you add a second JDK config, it becomes available in an existing job too.

This looks to me like a bug (tested in Jenkins ver. 1.629).

See a similar issue raised here: JDK selection is hidden even when a JDK is configured


There is a JDK dropdown in "job name" -> Configure in Jenkins web ui. It will list all JDKs available in Jenkins configuration.

As per @Derek comment below, n newer versions, you can find it in Manage Jenkins -> Global Tool Configuration -> JDK.

Note that you need the "Overall/Administer" permission to manage Jenkins.

Tags:

Java

Jenkins