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:
- 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 directoryC:\Program Files\Java. - Inside that path will be one or more subdirectories such as
.C:\Program Files\Java\jre6
Stage 2. Set the JAVA_HOME Variable
Once you have identified the JRE installation path:
- Right-click the My Computer icon on your desktop and select Properties.
- Click the Advanced tab.
- Click the Environment Variables button.
- Under System Variables, click New.
- Enter the variable name as
JAVA_HOME. - 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\jre6) in the environment variable instead.
- If your Java installation directory has a space in its path name, you should use the shortened path name (e.g.
- Click OK.
- Click Apply Changes.
- Restart Windows. (This is not always necessary, but it often prevents problems.)
- If you are running the Confluence EAR/WAR distribution, rather than the regular Confluence distribution, you may need to restart your application server.
source:
http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows
Advertisement