获取错误:cygwin中没有为hadoop设置java\u home

9gm1akwq  于 2021-06-03  发布在  Hadoop
关注(0)|答案(0)|浏览(256)

我正在尝试在hadoop的env.sh中设置javau home。我在Windows7上使用cygwin。我将env.sh编辑为:

export JAVA_HOME= "/cygdrive/C/Program Files/Java/jdk1.6.0_26"

在环境变量中,我将java\u home设置为c:\program files\java\jdk1.6.0\u 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.

当我做echo$java\u home时,它给出了c:\programfiles\java\jdk1.6.0\u26。我已经检查了这个网站上的一切可能,但仍然面临的问题。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题