Skip to content
Advertisement

How to change the JDK for a Jenkins job?

enter image description hereI have imported the jenkins jobs from existing jenkins server from another machine. But the problem is, it has the JDK referenced as per the old machines and I want to change it to use the JDK configured in my new jenkins. But I am unable to find any way of doing this. So, please if you have come across this situation and found a way then please help me too.

Thanks.

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement