How do I configure the java.home in a slave of a hudson server?

Winston Chen picture Winston Chen · Aug 8, 2011 · Viewed 9.5k times · Source

I am using a windows box to run the slave for my husdon. But I haven't found any effect way to configure JAVA_HOME and PATH for java on the box.

Does anyone know how I am able to do this?

Answer

Joachim Sauer picture Joachim Sauer · Aug 8, 2011

You can configure where Jenkins/Hudson should search for the JDK on the slave on the slave configuration page.

Check "Tool Locations", Click "Add", select the JDK from the List and type the path to the JDK in the "Home" text field below.

If JDK isn't showing up in the Tool Locations list, it may be because you need to configure a JDK globally first. To do this, check the "JDK" section in your global configuration page.