我正在尝试JAVA_HOME
在env.sh
hadoop 中设置。我在 Windows 7 上使用 cygwin。我编辑了env.sh
as :
export JAVA_HOME= "/cygdrive/C/Program Files/Java/jdk1.6.0_26"
在环境变量中,我将JAVA_HOM
E 设置为C:\Program Files\Java\jdk1.6.0_26
路径为%JAVA_HOME%\bin;c:\cygwin\bin;c:\cygwin\usr\sbin
但我仍然收到这些错误。
/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 2: $'\r': command not found
/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 7: $'\r': command not found
': not a valid identifierlibexec/../conf/hadoop-env.sh: line 9: export:
`/cygdrive/C/Program Files/Java/jdk1.6.0_26
/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 12: $'\r': command not found
/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 41: $'\r': command not found
/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 46: $'\r': command not found
/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 52: $'\r': command not found
/cygdrive/d/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 55: $'\r': command not found
Error: JAVA_HOME is not set.
我已经在这个网站上检查了所有可能的内容,但仍然面临问题。