首页 > 代码库 > hadoop Error: JAVA_HOME is not set and could not be found.

hadoop Error: JAVA_HOME is not set and could not be found.

Hadoop安装完后,启动时报Error: JAVA_HOME is not set and could not be found.
解决办法:
        修改/etc/hadoop/hadoop-env.sh中设JAVA_HOME。
        应当使用绝对路径。
        export JAVA_HOME=$JAVA_HOME                  //错误,不能这么改
        export JAVA_HOME=/usr/local/lib/jdk1.8.0_60        //正确,应该这么改

hadoop Error: JAVA_HOME is not set and could not be found.