hadoopcygwincygpath

Hadoop Cygwin Windows 7 JAVA_HOME Path not found and command not found


i have tried all possible solutions through google but still not working i am not getting what is this command not found error from hadoop-env.sh and bin/java not such a directory,

Here is hadoop-env.sh

export JAVA_HOME=/cygdrive/c/Java/jre6

export JAVA_HOME=c:/Java/jre6

Here is my error bellow

-bash-4.1$ bin/hadoop namenode -format

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 2: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 7: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 12: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 15: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 18: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 22: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 32: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 35: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 38: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 41: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 44: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 49: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 55: $'\r': command not found

/usr/local/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 58: $'\r': command not found

/bin/java: No such file or directory

/bin/java: No such file or directory

/bin/java: cannot execute: No such file or directory


Solution

  • Go to environment variable and then advance setting Go to user variable and setVariable JAVA_HOME and there Value C:\Java\sunjdk6.0.24 Then go to Path and set cygwin path c:\cygwin\bin;c:\cygwin\usr\bin

    DO it if not done erlier, If you still facing problem then see Link for Hadoop installation on windows and follow every steps.