fix JAVA_HOME detection