Jenkins Slave Environment Variable Refresh

Hudson/Jenkins does not use the slave environment variables as it supports multiple java versions so you configure the java home environment variables in the GUI.

What you need to do is go to Manage Hudson/Jenkins then choose Manage Nodes. Choose the Node you want to configure from the list and then choose Configure. Down the bottom there's a Node Properties section. Check the Tool Locations checkbox. Click on Add then Select your JDK in the dropdown list and add the new path to it.


Restart the slave, this fixed the issue on my configuration.


This is a bug in Jenkins: https://issues.jenkins-ci.org/browse/JENKINS-27739

3 ways to solve (I have personally confirmed each):

  1. Update Jenkins to >=1.617 (Recommended)
  2. Restart Jenkins master
  3. Delete Jenkins slave, then re-add it