Friday, May 13, 2016

Ubuntu how to config JAVA_HOME

1.  Ubuntu how to config JAVA_HOME

To set JAVA_HOME environment variable, do the following:

Launch Terminal by pressing Ctrl+Alt+T on your keyboard.
Enter the following command:
$ gksudo gedit /etc/environment
Depending on where you installed your Java, you will need to provide the full path. For this example, I installed Oracle JDK 7 in the /usr/lib/jvm/java-7-oracle directory.
Scroll to the end of the file and enter the following:
JAVA_HOME=/usr/lib/jvm/java-7-oracle
export JAVA_HOME
Save your file and exit gedit.
Lastly, reload the system PATH with the following command:
$ . /etc/environment

http://askubuntu.com/questions/175514/how-to-set-java-home-for-java

No comments:

Post a Comment