Added JAVA_HOME support