Skip to main content

Your /etc/bashrc/etc/bashrc sets PATHPATH by interpreting $JAVA_HOME's$JAVA_HOME's value at that moment. It does not get re-interpreted if JAVA_HOMEJAVA_HOME changes later. You'll want to add a line to the 3rd-party shell script that says: PATH=$JAVA_HOME:$PATH so that the 1.7 JAVA_HOMEJAVA_HOME is put into the path before the /etc/bashrc's/etc/bashrc's 1.8 JAVA_HOMEJAVA_HOME.

Your /etc/bashrc sets PATH by interpreting $JAVA_HOME's value at that moment. It does not get re-interpreted if JAVA_HOME changes later. You'll want to add a line to the 3rd-party shell script that says: PATH=$JAVA_HOME:$PATH so that the 1.7 JAVA_HOME is put into the path before the /etc/bashrc's 1.8 JAVA_HOME.

Your /etc/bashrc sets PATH by interpreting $JAVA_HOME's value at that moment. It does not get re-interpreted if JAVA_HOME changes later. You'll want to add a line to the 3rd-party shell script that says: PATH=$JAVA_HOME:$PATH so that the 1.7 JAVA_HOME is put into the path before the /etc/bashrc's 1.8 JAVA_HOME.

Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264

Your /etc/bashrc sets PATH by interpreting $JAVA_HOME's value at that moment. It does not get re-interpreted if JAVA_HOME changes later. You'll want to add a line to the 3rd-party shell script that says: PATH=$JAVA_HOME:$PATH so that the 1.7 JAVA_HOME is put into the path before the /etc/bashrc's 1.8 JAVA_HOME.