How to Set Java Home
To set the JAVA_HOME we use .bash_profile which is a start-up script.
1 Steps
1 min read
Easy
Step-by-Step Guide
-
Step 1: To set the JAVA_HOME we use .bash_profile which is a start-up script.
This particular file is used for commands which runs when the normal user logs in.
The steps to set JAVA_HOME are:
Login to your account and open .bash_profile file $ vi ~/.bash_profile If your path is set to /usr/java/jdk1.6.0_06/, set JAVA_HOME as follows: export JAVA_HOME=/usr/java/jdk1.6.0_06/ Save and close the file.
Logout and login back to see new changes, or type source ~/.bashrc
Detailed Guide
This particular file is used for commands which runs when the normal user logs in.
The steps to set JAVA_HOME are:
Login to your account and open .bash_profile file $ vi ~/.bash_profile If your path is set to /usr/java/jdk1.6.0_06/, set JAVA_HOME as follows: export JAVA_HOME=/usr/java/jdk1.6.0_06/ Save and close the file.
Logout and login back to see new changes, or type source ~/.bashrc
About the Author
C
Claire Reyes
Creates helpful guides on practical skills to inspire and educate readers.
32 articles
View all articles
Rate This Guide
--
Loading...
5
0
4
0
3
0
2
0
1
0
How helpful was this guide? Click to rate: