How to Set Java Home
Do you want to set Java Home? The variable Java Home, generally written as JAVA_HOME, is set to the install path of Java. Learning how to set JAVA_HOME in Windows and Linux isn't hard to do.
-
1Assuming that the path for the Java Development Kit (JDK) during installation is not changed, it will be in a directory under C:\Program Files\Java. This path will have the JDK, let's assume it has jdk1.6.0_06. So the install path is C:\Program Files\Java\jdk1.5.0_08.
- 2Setting JAVA_HOME using "My Computer":
- Right click on the My Computer icon on your desktop and select properties
- Click the Advanced Tab
- Click the Environment Variables button
- Under System Variable, click New
- Enter the variable name as JAVA_HOME
- Enter the variable value as the install path "C:\Program Files\Java\jdk1.6.0_06"
- Click OK
- Click Apply Changes
- Restart the computer to make sure the changes are reflected.
-
3Setting JAVA_HOME using command prompt
- Open command prompt
- Type the following in the command prompt
set JAVA_HOME = C:
and press enter
The JAVA_HOME is set.
0 nhận xét:
Post a Comment