The Article shows you Simply How to SetUp the JAVA_HOME Environment Variable for JDK Installation Ubuntu Linux.
This is Meant to Make Clear also How to Exactly Recognize your Java Installation Home Directory.
-
Open Terminal Window
(Press “Enter” to Execute Commands)In case first see: Terminal QuickStart Guide.
-
Find the Java Home:
ls -l /etc/alternatives/java
Clear the “/bin/java” suffix from the Output and the Remaining will be the JAVA_HOME.
Example: /usr/lib/jvm/jdk1.7.0.
-
SetUp the Environment Parameters File:
sudo nano ~/.bashrc
Append:
export JAVA_HOME=
Ctrl+Shift+v to Paste Content on nano
Ctrl+x to Save and Exit.Load:
source ./~bashrc
Howto Install Oracle Java JDK 7 on Ubuntu Linux 12
Oracle JDK 7 for Ubuntu 12