Fix JAVA_HOME error when java is missing