title: java_home error: change version of java or hadoop-env.sh file?
body: <p>When installing Single Node Setup for Hadoop 2.6.0 on Mac 10.7.5, the manual <a href="http://hadoop.apache.org/docs/r1.2.1/single_node_setup.html" rel="nofollow">http://hadoop.apache.org/docs/r1.2.1/single_node_setup.html</a> requires to update java_home.
  Namely,</p>
  
  <p>In Prepare to Start the Hadoop Cluster section, it says:</p>
  
  <p>"In the distribution, edit the file conf/hadoop-env.sh to define at least JAVA_HOME to be the root of your Java installation."</p>
  
  <p>I use the result of terminal query '/usr/libexec/java_home', which is
  /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home,
  for the value of java_home.</p>
  
  <p>As a result, hadoop scripts do not work due to error: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home: bad substitution.</p>
  
  <p>The mistake is likely to be due to mismatch of currently installed on Mac.
  My Java is 8.0_25 and the one hadoop uses is 6.0_05 (preferably from Sun). Also, this is the path of jdk and not jre, as may be needed.</p>
  
  <p>Unfortunately, I have not found any java ire 1.6.x for any x for Mac OS in Oracle Java archives. <a href="http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html" rel="nofollow">http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html</a></p>