JAVA_HOME not setting JAVA_HOME not setting hadoop hadoop

JAVA_HOME not setting


I simply added to the ./conf/hadoop-env.sh this line:

# The java implementation to use.  Required.export JAVA_HOME=/usr/java/latest

and it helped


Check if bin/start-all.sh doesn't override JAVA_HOME

Maybe put echo $JAVA_HOME inside that script straight before execution of those binaries?


The JAVA_HOME variable you set with set JAVA_HOME= is relevant only for the current shell. Given that you are starting a new shell when executing bin/start-all.sh you need to "export" the environmental variable to make it available in the global scope:

export JAVA_HOME=/usr/lib/jvm/java-6-sun