ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\Java\jre1.8.0_10
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\Java\jre1.8.0_10相关的知识,希望对你有一定的参考价值。
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
在配置gradle环境变量的时候出现的问题
~
~
~ 参考技术B 应该是设置成C:\Program Files (x86)\Java\jdk1.8.0_101
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
以上是关于ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\Java\jre1.8.0_10的主要内容,如果未能解决你的问题,请参考以下文章
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启动时报错,java: No such file or directory和localhost: Error: JAVA_HOME is not set.
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\Java\jre1.8.0_10
Windows环境下执行hadoop命令出现Error: JAVA_HOME is incorrectly set Please update D:SoftWarehadoop-2.6.0co(示例
maven中mvn-v出现Error: JAVA_HOME not found in your environment. Please set the JAVA_HOME var