user861938
user861938

Reputation: 83

getting error: JAVA_HOME not set for Hadoop in Cygwin

I am trying to set JAVA_HOME in env.sh in Hadoop. I am using Cygwin on Windows 7. I have edited the env.sh as:

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

In environment variables I have set JAVA_HOME as C:\Program Files\Java\jdk1.6.0_26.

And the path as %JAVA_HOME%\bin;c:\cygwin\bin;c:\cygwin\usr\sbin.

But still I am getting these errors:

/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.

When I am doing echo $JAVA_HOME, it is giving C:\Program Files\Java\jdk1.6.0_26. I have checked everything possible on this website, but still facing the problem.

Upvotes: 1

Views: 1210

Answers (0)

Related Questions