I'm trying to set my JAVA_HOME variable in my hadoop-env.sh file manually, but the path to my Java bin file is 'not a valid identifier' according to Cygwin.
I get the following error message, I believe I have escaped all special characters correctly
S@W27 /cygdrive/c/hadoop-1.2.1
$ bin/hadoop
/cygdrive/c/hadoop-1.2.1/libexec/../conf/hadoop-env.sh: line 9: export:
`C:\Program Files (x86)\Java\jre7': not a valid identifier
I have tried the same file path with forward slashes, and also with /bin/java at the end but with no success.
Why is the path invalid?
hey Simon the path should be with " " in forward slash or in backward slash without qoute like this :-
export JAVA_HOME="C:\Program Files (x86)\Java\jre7"
export JAVA_HOME=/Program Files (x86)/Java/jre7 #(as the root is C drive)
and in hadoop installation it is strictly mentioned that you have to set your JAVA path to
export JAVA_HOME="C:\Java\jre8"
that should not be inside the program files.
It is just started ,welcome to the world of HADOOP in WINDOWS.
The example with forward slashes is incorrect. Any value which contains spaces needs to be in quotes. In Bourne-family shells, including Bash, single quotes are used around verbatim strings, while double quotes are "weaker" (so, for example, backslashes in double-quoted strings should properly be doubled to represent a literal backslash).