当在cygwin中执行java中的命令时,提示No such file or directory

当在cygwin中执行java中的命令时,提示No such file or directory

admin@admin-PC /

$ hadoop version
/cygdrive/f/大数据视频/HadoopTool/hadoop-0.20.2/hadoop-0.20.2/bin/hadoop:行258: /cygdrive/f/JDK/jdk/bin/java: No such file or directory
/cygdrive/f/大数据视频/HadoopTool/hadoop-0.20.2/hadoop-0.20.2/bin/hadoop:行289: /cygdrive/f/JDK/jdk/bin/java: No such file or directory


admin@admin-PC /

$


这时,是hadoop-env.sh中java环境变量导入错误

在hadoop-env.sh中修改为自己的cygwin下的jdk位置

export JAVA_HOME=/cygdrive/E/JDK/jdk

可以执行hadoop命令了。

admin@admin-PC /
$ hadoop version
Hadoop 0.20.2
Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707
Compiled by chrisdo on Fri Feb 19 08:07:34 UTC 2010


admin@admin-PC /
$

你可能感兴趣的:(大数据)