improve how JAVA_HOME on linux is detected