This one is the easy setup, but I keep on forgetting it. So its a reminder blog for myself.
As ‘sudo’ open up /etc/bash.bashrc
Add the following to the end of the file.
JAVA_HOME=/usr/lib/jvm/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
*NOTE: Set the java path to whatever the actual path is on your environment
Reboot and try running the following:
$ echo $JAVA_HOME
>> /usr/lib/jvm/java
echo $PATH