SyntaxFix
Write A Post
Hire A Developer
Questions
I did it by putting
export JAVA_HOME=`/usr/libexec/java_home`
(backtics) in my .bashrc. See my comment on Adrian's answer.