What is the result of echo $JAVA_HOME
It’s should be export JAVA_HOME=`/usr/libexec/java_home`, you missed the `