Set Java Home on Ubuntu
October 03, 2015 by Sandeep Bhardwaj | Tags: Ubuntu Java
Setting the environment variable in Ubuntu in really easy, just need to edit the /etc/profile. Just add your java installation directory as below.
Open the /etc/profile file in your favorite editor.
sudo gedit /etc/profile
Add following lines in end
JAVA_HOME=/usr/local/java/jdk1.8.0_60
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
Note: For Installing Java on Ubuntu follow the post