how to set java_home on ubuntu
– open terminal and sudo su to root.
– in terminal type which java and copy the java installation path
– now type, gedit .bashrc
– on the bottom of the file add below lines
JAVA_HOME=/usr/lib/jvm/java-8-oracle (the path of java installation)
export JAVA_HOME
PATH=$PATH:$JAVA_HOME
export PATH
– then save the file.
– close terminal and open it again.
– Type, echo $JAVA_HOME
if it displays the java installation path then it’s done!! 🙂
No images available.