Installing Java for Confluence

This page contains instructions for installing the Java Development Kit (JDK). This is a manual step that's only required if you're installing Confluence from a zip or archive file.  

If you're using the Confluence installer, you don't need to install Java manually, but you can choose to use a different Java vendor.  

Check the Supported Platforms page to find out which Java versions and vendors can be used with Confluence.

Installing Java

The JDK (Java Development Kit) needs to be installed on the same server that will have Confluence installed.  We support running Confluence with the JDK or JRE (Java Runtime Environment). These instructions will just cover installing the JDK. 

Installing the JDK on Windows...

Before you start, go to Control Panel > Programs and Features to check whether a JDK is already installed.

To install the JDK on Windows:

  1. Download the appropriate AdoptOpenJDK or Oracle JDK version.
    Check the Supported Platforms page to find out which JDK / JRE versions and vendors are supported for your version of Confluence. Be sure to download the right one for your operating system.
  2. Run the Java installer. Make a note of the installation directory, as you'll need this later.
  3. Once the Java installation is complete, check that the JAVA_HOME  environment variable has been set correctly.
    Open a command prompt and type echo %JAVA_HOME% and hit Enter. 
    • If you see a path to your Java installation directory, the JAVA_Home environment variable has been set correctly.
    • If nothing is displayed, or only %JAVA_HOME% is returned, you'll need to set the JAVA_HOME environment variable manually. See Setting the JAVA_HOME Variable in Windows for a step by step guide.  

Installing the JDK on Linux...

Before you start, check whether a JDK is already installed. Open a shell console and type echo $JAVA_HOME and hit Enter.

  • If it returns something like/opt/JDK8 or /usr/lib/jvm/java8, then your JDK is installed and properly configured.
  • If nothing is displayed, you'll need to install the JDK or set the $JAVA_HOME environment variable.
    You can set this environment variable in your user account's 'profile' file. Alternatively, you can set this after installing Confluence, by defining this path in your Confluence installation's setenv.sh file, usually located in the Confluence bin directory.

To install the JDK on Linux:

  1. Download the appropriate AdoptOpenJDK or Oracle JDK version.
    Check the Supported Platforms page to find out which JDK / JRE versions are supported for your version of Confluence. Be sure to download the right one for your operating system.
  2. Run the Java installer.
  3. Open a shell console and type echo $JAVA_HOME and hit Enter to check that it has installed correctly (see notes above).

Note: Any Java or JDK version numbers on this page are examples only. Please refer to the Supported Platforms page for supported versions of Java.

Last modified on Apr 13, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.