Start a new topic
Answered

Setting the JAVA_HOME Variable

(Helpful when troubleshooting or Installing Java JRE7 runtime environment)


After you have installed the Java Runtime Environment (JRE) in Windows, you must set the JAVA_HOME environment variable to point to the JRE installation directory.


Stage 1. Locate the JRE Installation Directory

If you already know the installation path for the Java Runtime Environment, go to Stage 2 below. Otherwise, find the installation path by following these instructions:

1. If you didn't change the installation path for the Java Runtime Environment during installation, it will be in a directory under C:\Program Files\Java. Using Explorer, open the directory C:\Program Files\Java.

2. Inside that path will be one or more subdirectories such as C:\Program Files\Java\jre7.


Stage 2. Set the JAVA_HOME Variable
Once you have identified the JRE installation path:

1. Right-click the My Computer icon on your desktop and select Properties.
2. Click the Advanced tab.
3. Click the Environment Variables button.
4. Under System Variables, click New.
5. Enter the variable name as JAVA_HOME.
6. Enter the variable value as the installation path for the Java Development Kit.
If your Java installation directory has a space in its path name, you should use the shortened path name (e.g. C:\Progra~1\Java\jre7) in the environment variable instead.
7. Click OK.
8. Click Apply Changes.
9. Close any command window which was open before you made these changes, and open a new command window. There is no way to reload environment variables from an active command prompt. 
10. If the changes do not take effect even after reopening the command window, restart Windows.

Best Answer

thanks for the info

1 Comment

Answer

thanks for the info

Login or Signup to post a comment