title: JAVA _Home is not set in Hadoop
body: <p>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</p>
  
  <pre><code># The java implementation to use.
  export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386/
  export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/etc/hadoop"}
  </code></pre>
  
  <p>But when I run it the following errors come-</p>
  
  <pre><code>Starting namenodes on [localhost]
  localhost: Error: JAVA_HOME is not set and could not be found.
  localhost: Error: JAVA_HOME is not set and could not be found.
  Starting secondary namenodes [0.0.0.0]
  0.0.0.0: Error: JAVA_HOME is not set and could not be found.
  </code></pre>
  
  <p>How do I remove this error?</p>