I have set JAVA_HOME
correctly and when I echo
it, I see the correct value:
$ echo $JAVA_HOME
/usr/lib/jvm/java-6-openjdk-amd64/
I have also put the JAVA_HOME
value to the hadoop-env.sh.
$ grep JAVA_HOME conf/hadoop-env.sh
# The only required environment variable is JAVA_HOME. All others are
# set JAVA_HOME in this file, so that it is correctly defined on
export JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64/"
Despite all of this, hadoop still shows the JAVA_HOME
variable totally different. I dont know where it gets this value. Any suggestions?
$ hadoop noname -format
Warning: $HADOOP_HOME is deprecated.
/usr/bin/hadoop: line 320: /usr/lib/jvm/java-6-sun/bin/java: No such file or directory
/usr/bin/hadoop: line 390: /usr/lib/jvm/java-6-sun/bin/java: No such file or directory
I had the same problem on my Hadoop install as well. I found in /etc/hadoop/hadoop-env.sh
JAVA_HOME was hardcoded to be /usr/lib/jvm/java-6-sun
. I went ahead and changed it to ${JAVA_HOME}
and that seemed to do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With