(HBase) Error: JAVA_HOME is not set and Java could not be found (HBase) Error: JAVA_HOME is not set and Java could not be found hadoop hadoop

(HBase) Error: JAVA_HOME is not set and Java could not be found


Apparently the HBase could not find JAVA_HOME and java binary although you can run java -version locally.

You should run export JAVA_HOME=/the/path/of/you/jdk/ before running HBase.

BTY, echo JAVA_HOME JAVA_HOME is incorrect. You may want echo $JAVA_HOME.


Hbase tries to read JAVA_HOME directory set on hbase-env.sh file.

In hbase-env.sh file

export JAVA_HOME=/usr/java/jdk1.6.0/ is set and commented.

Default JAVA_HOME set for hbase.

If you set java home in different directory please edit the line and comment out it.

It will solve your problem.


Please refer to below:

"Java needs to be installed and available. If you get an error indicating that Java is not installed, but it is on your system, perhaps in a non-standard location, edit the conf/hbase-env.sh file and modify the JAVA_HOME setting to point to the directory that contains bin/java your system."

The link is http://hbase.apache.org/book/quickstart.html