I am using CentOS. I installed Java8 from the rpm.
Following the tutorial I did this:
export JAVA_HOME=jdk-install-dir
export PATH=$JAVA_HOME/bin:$PATH
However, when I disconnect from SSH it has gone. How can I save the above into the .bash_profile? I believe this is the best way to resolve this problem.
Following this tutorial:
https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/
Thanks!