Setting the JAVA_HOME Variable in Windows

After you've installed Java in Windows, you must set the  JAVA_HOME  environment variable to point to the Java installation directory.

This information is only relevant if you're installing Confluence manually on a Windows server. If you're using the installer, we'll do this part for you.

If you installed the Java Development Kit (JDK) you'll be setting the JAVA_HOME environment variable. If you installed the Java Runtime Environment (JRE) you will follow the same steps but set the JRE_HOME environment variable instead. 

Set the JAVA_HOME Variable

To set the JAVA_HOME variable:

  1. Locate the Java installation directory

    If you didn't change the path during installation, it'll be something like C:\Program Files\Java\jdk1.8.0_65

  2. Do one of the following:
    Windows 7 – Right click My Computer and select Properties > Advanced
    Windows 8 – Go to Control Panel > System > Advanced System Settings
  3. Click the Environment Variables button
  4. Under System Variables, click New
  5. In the Variable Name field, enter either:
    • JAVA_HOME if you installed the JDK (Java Development Kit)
      or
    • JRE_HOME if you installed the JRE (Java Runtime Environment) 
  6. In the Variable Value field, enter your JDK or JRE installation path 

    If the path contains spaces, use the shortened path name. For example, C:\Progra~1\Java\jdk1.8.0_65


     

    Note for Windows users on 64-bit systems

    Progra~1 = 'Program Files'
    Progra~2 = 'Program Files(x86)'

  7. Click OK and Apply Changes as prompted

You'll need to close and re-open any command windows that were open before you made these changes, as there's no way to reload environment variables from an active command prompt. If the changes don't take effect after reopening the command window, restart Windows.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport