title: Hadoop 2.2.0 fails running start-dfs.sh with Error: JAVA_HOME is not set and could not be found
body: <p>I have a work in progress installation of Hadoop in Ubuntu 12.x. I already had a <code>deploy</code> user which I plan to use to run hadoop in a cluster of machines. The following code demonstrate my problem basically I can <code>ssh olympus</code> no problems but <code>start-dfs.sh</code> fails doing exactly that:</p>
  
  <pre><code>deploy@olympus:~$ ssh olympus
  Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.5.0-45-generic x86_64)
  
      * Documentation:  https://help.ubuntu.com/
  
  Last login: Mon Feb  3 18:22:27 2014 from olympus
  deploy@olympus:~$ echo $JAVA_HOME
  /opt/dev/java/1.7.0_51
  
  deploy@olympus:~$ start-dfs.sh
  Starting namenodes on [olympus]
  olympus: Error: JAVA_HOME is not set and could not be found.
  </code></pre>