hbase无法启动: HBase requires Java 1.6 or later.

来源:互联网 发布:js thread.sleep 编辑:程序博客网 时间:2024/06/05 21:56
slave1: +======================================================================+ 
slave1: | Error: JAVA_HOME is not set and Java could not be found | 
slave1: +----------------------------------------------------------------------+ 
slave1: | Please download the latest Sun JDK from the Sun Java web site | 
slave1: | > http://java.sun.com/javase/downloads/ < | 
slave1: | | 
slave1: | HBase requires Java 1.6 or later. | 
slave1: | NOTE: This script will find Sun Java whether you install using the | 
slave1: | binary or the RPM based installer. | 
slave1: +======================================================================+ 
slave2: +======================================================================+ 
slave2: | Error: JAVA_HOME is not set and Java could not be found | 
slave2: +----------------------------------------------------------------------+ 
slave2: | Please download the latest Sun JDK from the Sun Java web site | 
slave2: | > http://java.sun.com/javase/downloads/ < | 
slave2: | | 
slave2: | HBase requires Java 1.6 or later. | 
slave2: | NOTE: This script will find Sun Java whether you install using the | 
slave2: | binary or the RPM based installer. | 
slave2: +======================================================================+

这是由于hbase没有找到jdk的原因,修改hbase/conf/hbase-env.sh文件,添加JAVA_HOME,如下:
# The java implementation to use. Java 1.6 required.
export JAVA_HOME=/usr/java/jdk1.7.0_25
0 0