Added some JAVA_HOME logic