You can try setting the .bashrc profile as well and you can try to set JAVA_HOME variable like this : export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=${JAVA_HOME}/bin:$PATH
You can try setting the .bashrc profile as well and you can try to set JAVA_HOME variable like this : export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=${JAVA_HOME}/bin:$PATH