//First install java sdk then export JAVA_HOME=$(/usr/libexec/java_home)
echo " export JAVA_HOME=/usr/libexec/java_home " >> ~/.bashrc && . ~/.bashrc