Wednesday, February 12, 2014

Setup JAVA_HOME Ubuntu

There are several ways to set-up JAVA_HOME : 

1) Temporary for current active session, open the terminal and enter the two command line:

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=$PATH:/$JAVA_HOME/bin




2) Permanent and for all users by changing either bashrc or profile files, open the terminal and enter the command line:


nano ~/.bashrc

nano /etc/profile

3) at the beginning of the opened file past the two line :

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=$PATH:/$JAVA_HOME/bin

No comments:

Post a Comment