Added check on JAVA_HOME