fixed bug in setting env variable $JAVA_HOME