Confluence Docs 3.0 : Setting the JAVA_HOME Variable in Windows This page last changed on Aug 30, 2009 by rhartono. This information is only relevant if you are installing Confluence on a Windows server. After you have installed the Java Development Kit in Windows, you must set the JAVA_HOME variable to the installation directory.
| Please check that you have a JDK or SDK — Java JRE is not enough A common problem is that people have only installed the Java Runtime Environment (JRE). You need either a Java Development Kit (JDK) or J2SE Software Development Kit (SDK). To confirm that you have the right version, you can check the Java installation path. Unless you changed the path during installation, Java will be installed to a subdirectory under `C:\Program Files\Java`, for example `C:\Program Files\Java\jdk1.5.0_02` Open `C:\Program Files\Java` and confirm the installation path is for a JDK or SDK. JRE installations are not suitable, and have an installation directory begining with `jre`. The numbers after the `jre` are not relevant. Example JREs are: jre1.4.0_02 jre1.5.0_14 SDK and JDK installations are suitable. Their installation directory begins with `jdk` or `j2sdk`, the numbers at the end are not relevant. Example JDK and SDKs are: jdk1.5.0_02 j2sdk1.5.0_09 Any installation directory starting with `jdk` or `j2sdk` is valid. If you cannot see an installed JDK or SDK, install the JDK now from the JDK download site
### Stage 1. Locate the JDK Installation Directory If you already know the installation path for the Java or Software Development Kit, go to Stage 2 below. Otherwise, find the installation path by following these instructions: Unless you changed the installation path for the Java Development Kit during installation, it will be in a directory under `C:\Program Files\Java`. Using Explorer, open the directory `C:\Program Files\Java`. Inside that path will be one or more subdirectories such as `jdk1.5.0_08`. If you have just installed the Java Development Kit, it will be installed to the newest directory, which you can find by sorting by date. For example, it may be installed in `C:\Program Files\Java\jdk1.5.0_08`. This is the installation path. ### Stage 2. Set the JAVA_HOME Variable Once you have identified the JDK 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. Click 'OK'. Click 'Apply Changes'. If you are running Confluence as a EAR/WAR rather than the Standalone, you may need to restart your application server. This diagram shows setting the `JAVA_HOME` variable to an installation path of `c:/j2sdk1.4.2`: If you came here from Installing Confluence Standalone Using the Automatic Installer, go back and begin Stage 3. ##### RELATED TOPICS Installing Confluence Standalone Using the Automatic Installer Starting Tomcat as a Windows Service Installing Confluence in Linux Attachments: javahome.jpg (image/jpeg)

Document generated by Confluence on Nov 05, 2009 23:27