I'm currently using hadoop and in the config part there's
"define JAVA_HOME at least to be the root of your java installation"
I'm actually confused about it.
Say, my JAVA_HOME when using: echo $JAVA_HOME
is: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
and my java installation when using: which java is:
/usr/bin/java
What change should I make to set JAVA_HOME as the java root?
Thanks!
And for a follow up, I think the tutorial mentioned to make the change inside the conf/en-sh part. I tried the combinations of the below answers proposed, but still got the error of 1. invalid identifier for the export JAVA_HOME = .. part 2. unable to load hadoop library
Please help..... Any suggestion?
On my system, I have JAVA_HOME set to /Library/Java/Home
on Mountain Lion. Fair enough... add export JAVA_HOME=/Library/Java/Home
line to the .bash_profile, .zshrc file in your home directory. If you're using tcsh, the line you want is setenv JAVA_HOME /Library/Java/Home
. The default shell on recent versions of OS X for users in bash. You can find out what you're using using echo $SHELL
.