default JAVA_HOME in hadoop-env.sh

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

default JAVA_HOME in hadoop-env.sh

Shannon -jj Behrens
The default JAVA_HOME in hadoop-env.sh is /usr/bin/java.  This is
confusing because /usr/bin/java is a binary, not a directory.  On my
system, this resulted in:

$ hadoop namenode -format
/usr/local/hadoop-install/hadoop/bin/hadoop: 122:
/usr/bin/java/bin/java: not found
exec: 179: /usr/bin/java/bin/java: not found

I think it would be less confusing if the default were /usr instead.

Happy Hacking!
-jj

--
http://jjinux.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: default JAVA_HOME in hadoop-env.sh

Doug Cutting
Shannon -jj Behrens wrote:

> The default JAVA_HOME in hadoop-env.sh is /usr/bin/java.  This is
> confusing because /usr/bin/java is a binary, not a directory.  On my
> system, this resulted in:
>
> $ hadoop namenode -format
> /usr/local/hadoop-install/hadoop/bin/hadoop: 122:
> /usr/bin/java/bin/java: not found
> exec: 179: /usr/bin/java/bin/java: not found
>
> I think it would be less confusing if the default were /usr instead.

This is in a comment, but, I agree, the comment should provide a better
example value.  I just updated this to be /usr/lib/j2sdk1.5-sun, the
correct value on Ubuntu 6.10.

Doug