配置Hadoop显示JAVA_HOME is not set。急求答案,谢谢!
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置Hadoop显示JAVA_HOME is not set。急求答案,谢谢!相关的知识,希望对你有一定的参考价值。
如图,JAVA_HOME is not set
D:\hadoop-1.0.3\conf中的hadoop-env.sh文件中JAVA_HOME已经用写字板改为:
export JAVA_HOME=/cygdrive/d/Java/jdk1.6.0_29
我的JAVA装在D盘Java中,感觉已经配好了,为什么还是显示not set呢?
急,谢谢了!
应该是系统环境变量设置了就可以了,不用再cygwin中设置吧
这个是我这里的配置
你查下XP或win7的JDK设置
希望对你有帮助。
用什么工具啊?
之前是因为export前面的注释符号“#”没删除,导致JAVA_HOME is not set这个问题。改了以后又出现了另外的问题,输入命令后
这是为什么啊?
hadoop启动时报错,java: No such file or directory和localhost: Error: JAVA_HOME is not set.
hadoop-env.sh文件中配置为
# The java implementation to use. Required.
# export JAVA_HOME=/cygdrive/d/Java/jdk1.6.0_26
jdk1.6.0_26安装路径为:
D:\Java\jdk1.6.0_26\
电脑中环境变量java_home为:
D:\Java\jdk1.6.0_26\;D:\Java\jdk1.6.0_26\jre\bin
完全按照《Hadoop开发者》第一期,在win7环境下配置的,运行./start-all.sh,报错java: No such file or directory和localhost: Error: JAVA_HOME is not set.
william@william-PC /cygdrive/d/hadoop/run/bin
$ ls
hadoop slaves.sh start-mapred.sh stop-mapred.sh
hadoop-config.sh start-all.sh stop-all.sh task-controller
hadoop-daemon.sh start-balancer.sh stop-balancer.sh
hadoop-daemons.sh start-dfs.sh stop-dfs.sh
rcc start-jobhistoryserver.sh stop-jobhistoryserver.sh
william@william-PC /cygdrive/d/hadoop/run/bin
$ ./start-all.sh
starting namenode, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoop-william-name node-william-PC.out
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 321: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: exec: D:\Java\jdk1.6.0_26\;D:\Ja va\jdk1.6.0_26\jre\bin/bin/java: cannot execute: No such file or directory
localhost: starting datanode, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoop-w illiam-datanode-william-PC.out
localhost: Error: JAVA_HOME is not set.
localhost: starting secondarynamenode, logging to /cygdrive/d/hadoop/run/libexec/../logs /hadoop-william-secondarynamenode-william-PC.out
localhost: Error: JAVA_HOME is not set.
starting jobtracker, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoop-william-jo btracker-william-PC.out
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 321: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: D:\Java\jdk1.6.0_26\;D:\Java\jdk 1.6.0_26\jre\bin/bin/java: No such file or directory
/cygdrive/d/hadoop/run/libexec/../bin/hadoop: line 387: exec: D:\Java\jdk1.6.0_26\;D:\Ja va\jdk1.6.0_26\jre\bin/bin/java: cannot execute: No such file or directory
localhost: starting tasktracker, logging to /cygdrive/d/hadoop/run/libexec/../logs/hadoo p-william-tasktracker-william-PC.out
localhost: Error: JAVA_HOME is not set.
刚开始学hadoop,就遇到这个问题,已经周旋好几天好,始终解决不了,拜求大虾帮小弟看看啊!
# export JAVA_HOME=/cygdrive/d/Java/jdk1.6.0_26
------->
# The java implementation to use. Required
export JAVA_HOME=/cygdrive/d/Java/jdk1.6.0_26 参考技术B 很明显是java home没有配好 ,输入cd $JAVA_HOME,看行不行?本回答被提问者采纳 参考技术C 1234123
以上是关于配置Hadoop显示JAVA_HOME is not set。急求答案,谢谢!的主要内容,如果未能解决你的问题,请参考以下文章
启动hadoop,报错Error JAVA_HOME is not set and could not be found
hadoop start-all.sh报错JAVA_HOME is not set and could not be found.
启动hadoop时出现ERROR: JAVA_HOME is not set and could not be found.解决办法
windows下安装hadoop总是出错 JAVA_HOME is not set.