Things You'll Need:
- Java JDK
-
Step 1
Click on "Properties" under "My Computer."
-
Step 2
Select the "Advanced" tab.
-
Step 3
Click on "Environmental Variables."
-
Step 4
Type the path to the Java JDK folder next to "JAVA_HOME". The default location is "C:\Program Files\Java|jdk<version>." Replace <version> with the version number of the installed JDK.
-
Step 1
Open the file "~/.bashrc" in any text editor.
-
Step 2
Add the following two lines to the ".bashrc" file:
export JAVA_HOME=/usr/java/jdk<version>/bin/java
export PATH=$PATH:/usr/java/jdk<version>/bin
Replace <version> with the version number of the installed JDK. -
Step 3
Save and close the file.
-
Step 4
Open a terminal window. The terminal window will be found in the operating system's main "Application" menu, under either "System Tools" or "Utilities". You will be presented with a command prompt.
-
Step 5
Type "echo $JAVA_HOME" (no quotes) to test your configuration.














