vim .bash_profile add "export JAVA_HOME=$(/usr/libexec/java_home)" to bash_profile source .bash_profile