Fix JAVA_HOME issues