title: JAVA_HOME not being found when launching hbase. Any suggestions?
body: <p>I'm just playing around with hbase( on EC2) and am having a problem when I launch it. Here's what I get:</p>
  
  <pre><code>[root@domU-12-31-39-13-D6-62 ~]# sudo /etc/init.d/hadoop-hbase-master start
  +======================================================================+
  |      Error: JAVA_HOME is not set and Java could not be found         |
  +----------------------------------------------------------------------+
  | Please download the latest Sun JDK from the Sun Java web site        |
  |       &gt; http://java.sun.com/javase/downloads/ &lt;                      |
  |                                                                      |
  | HBase requires Java 1.6 or later.                                    |
  | NOTE: This script will find Sun Java whether you install using the   |
  |       binary or the RPM based installer.                             |
  +======================================================================+
  </code></pre>
  
  <p>I looked up the error and installed openjdk 1.6 and set the java_home variable in my .bash_profile and in /etc/profile(just in case hbase is running as a different user). It seems to have taken effect:</p>
  
  <pre><code>[root@domU-12-31-39-13-D6-62 ~]# java -version
  java version "1.6.0_22"
  OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.42.1.10.4.el6_2-x86_64)
  OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
  [root@domU-12-31-39-13-D6-62 ~]# echo $JAVA_HOME
  /usr/bin/java
  </code></pre>
  
  <p>but I still get this error when launching hbase.  I'm not that famlair with java so I'm not sure what I'm doing wrong.  If it helps, I'm using centos6 on ec2 and cloudera's repository for the hbase/hadoop packages.</p>