$JAVA_HOME path not sourced correctly in ~/bash_profile at login?
Upon logging into my CentOS 7 VM, my $JAVAHOME is always set to : /usr/lib/jvm/java-1.8.0-openjdk-184.108.40.206-11.b12.el7.x8664/jre, which is incorrect.
My ~/.bash_profile reads:
Get the aliases and functions
if [ -f ~/.bashrc ]; then
User specific environment and startup programs
Sourcing .bashprofile each time I open a new terminal appears to correct the issue, but why is my $JAVAHOME path defaulting to an old version on startup and not being set to the directory specified in .bash_profile?