Set up JAVA_HOME on Jenkins agents using Groovy script.