I am a beginner with hadoop and trying to install and run hadoop in my Ubuntu as a single node cluster. This is my JAVA_HOME in my hadoop_env.sh
# The java
Under your HADOOP_HOME/conf directory please update the hadoop-env.sh file. It has entry to export JAVA_HOME.
hadoop-env.sh
Setting to appropriate JAVA_HOME in this file should solve your issue.