To get the latest and greatest features in JIRA, please upgrade to JIRA Software. Visit the Migration Hub for more information.

Installing Java

Please skip these instructions if you are intend to use or have used the Windows Installer or Linux Installer to install JIRA, since these executable files will install and configure their own JRE to run JIRA. If you are trying to use a different Java/JRE instead of the version bundled with JIRA, please use the How to Use System JRE Instead of Embedded JRE guide.

On this page:

1. Installing Java

JIRA requires Oracle's (formerly Sun's) Java Development Kit (JDK) or Java Runtime Environment (JRE) platform to run. Refer to Supported Platforms for details on the Java platform versions that JIRA supports.

Oracle's JDK/JRE can be downloaded from Oracle's website.

(warning) Linux distributions frequently have an open-source implementation of Java called GCJ installed. Do not use this Java platform — it is incomplete and JIRA will not run successfully on it.

You can test whether you have the correct Java platform by running java -version:

2. Setting the JAVA_HOME

Once the JDK or JRE is installed, you will need to set the JAVA_HOME environment variable, whose value is the root directory of the JDK/JRE.

Some JDK/JRE installers set this automatically (check by typing 'echo %JAVA_HOME%' in a Windows command prompt, or 'echo $JAVA_HOME' in a Linux/UNIX console).

Linux-based computers

On many Linux-based computers, the JAVA_HOME environment variable is set in the /etc/environment file.

If JAVA_HOME is not defined in this file, you can set it using the following command at a shell prompt, when logged in with 'root' level permissions:

  • echo JAVA_HOME="path/to/JAVA_HOME" >> /etc/environment

If, however, JAVA_HOME is already defined in this file, open the /etc/environment file in a text editor and modify its value to the appropriate path/to/JAVA_HOME — that is:

  • JAVA_HOME="path/to/JAVA_HOME"

Windows-based computers

If this environment variable is not set on a Windows-based computer, you can set it in the Control Panel using the following procedure:

  1. Open the Windows 'Advanced' system properties dialog box:
    • On Windows XP-based operating systems, right-click on the My Computer icon on your desktop (or via the Start menu), select 'Properties' and click the 'Advanced' tab.
    • On Windows 7-based operating systems, right-click the Computer icon on your desktop (or via the Start menu), select 'Properties', click 'Advanced system settings', select 'Properties' and click the 'Advanced' tab.
  2. Click the Environment Variables button.
  3. Click one of the New buttons (to define a new environment variable for your user account, or if available, system-wide).
  4. Type JAVA_HOME as the variable name and the directory where you installed Java.

    (info) The default path for the bundled JRE with JIRA is C:\Program Files\Atlassian\JIRA\jre. If using a 32-bit install in 64-bit system, this would be C:\Program Files (x86)\Atlassian\JIRA\jre.
  5. After clicking the required 'OK' buttons to save your changes, your JAVA_HOME environment variable should be available in a new command prompt window. If not or if necessary, restart your computer.

3. Confirming that Java Works

Once the steps above have been done, it should be possible to open a Windows command prompt and type %JAVA_HOME%\bin\java -version (or "%JAVA_HOME%"\bin\java -version if your %JAVA_HOME% value contains spaces) and see output similar to this:

(info) If you subsequently start JIRA and you receive an error like Windows cannot find '-Xms128m', then you may not have correctly set JAVA_HOME. Please verify step 2 of the procedure above.

Next Step

Installing JIRA from an Archive File on Windows, Linux or Solaris

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

19 Archived comments

  1. User avatar

    Aren Cambre

    How about instructions for setting JAVA_HOME for Linux users?

    Also not sure sun-java6-jdk is a good idea. That is the entire JDK. Isn't just the JRE needed?

    17 Feb 2010
  2. User avatar


    To set JAVA_HOME for ubuntu I did following:

    to find out where java was installed:

    whereis javac (the result of executing will be the path)
    ls -al path (for example: ls -al /usr/bin/javac)
    and repeat this step while you find the real path... (ls -al /etc/alternatives/javac)

    to set JAVA_HOME:
        JAVA_HOME= path to java (JAVA_HOME=/usr/lib/jvm/java-6-sun)
        export JAVA_HOME

    20 Feb 2010
  3. User avatar

    Andrew Dixon

    I put the JAVA_HOME environment variable in /etc/environment. The first thing you'll want to do

    is make sure that you have the right path:

         $ls /usr/lib/jvm

    if that is the path to your java directory, execute the next instruction to set JAVA_HOME:

         $sudo bash -c "echo JAVA_HOME=/usr/lib/jvm/java-6-sun/ >> /etc/environment"

    Log out and log back in again and you can see that JAVA_HOME is set by executing:

         $echo $JAVA_HOME

    13 Apr 2010
  4. User avatar

    Ángel Medinilla

    In Mac OS you can also check your java installation by

    # java -version

    And you can set JAVA_HOME to:

    # export JAVA_HOME=`/usr/libexec/java_home`

    You can also add this command to ~./.profile so it gets executed everytime you log in.

    Hope it helps :)

    21 May 2010
  5. User avatar


    As of Lucid 10.4, Sun Java has been moved to the partner repository. You must do this before installing sun-java6-jdk:

    sudo add-apt-repository "deb lucid partner"
    sudo apt-get update

    22 Sep 2010
  6. User avatar


    I've installed JDK in this path (Debian 6 squeeze):

    Then I went to /etc/profile to put the following line at the end of the file

    Then I saved the file and ran the following comand:

    Just to be sure I restarted my machine and I could check that the installation was OK running the following command:

    So I could check Java was installed properly

    14 Feb 2011
    1. User avatar


      I run SUSE 10

      I have JAVA_HOME set to  JDK 5.0 .

      I need that JAVA_HOME point to JDK6.0.

      How I will do that?

      18 Mar 2011
  7. User avatar


    In a fresh install of Ubuntu 10.04 64bit, add-apt-repository is not installed by default... try:

    > sudo aptitude install python-software-properties

    > sudo add-apt-repository "deb lucid partner"

    > sudo aptitude update

    > sudo aptitude install sun-java6-jdk

    Replace aptitude with apt-get if so desired (use one or the other)

    23 Mar 2011
  8. User avatar

    Whit Blauvelt

    More complete instructions for Ubuntu 10.04 and 10.10 are here:

    Also, the add-apt-repository command is installed as part of the python-software-properties package, which may need to be installed first.

    27 Apr 2011
  9. User avatar


    I have read in the documentation elsewhere that the JDK is necessary?

    I also note that the new JIRA installer installs another jre instance.

    Does JIRA now use the cacerts file in this jre?

    Surely there is some redundancy here?


    23 Sep 2011
    1. User avatar

      Giles Gaskell

      Hello there,

      I have read in the documentation elsewhere that the JDK is necessary?

      Only a JRE is necessary to run JIRA, although if you're building JIRA from source, a JDK is required. If you've read elsewhere on this site that a JDK is required to run JIRA, please let us know so we can correct our documentation.

      I also note that the new JIRA installer installs another jre instance.

      That's true, the new installers (available from JIRA 4.4) for Windows and Linux install their own JREs.

      Does JIRA now use the cacerts file in this jre?

      Surely there is some redundancy here?

      I asked one of my colleagues these questions, to which the response was 'JIRA will use the cacerts file in these JREs. While this situation may provide some redundancy, having a bundled JRE in these installers simplifies the JIRA installation and configuration process, which is the core purpose of these installers.'



      23 Sep 2011
      1. User avatar


        Giles quoting colleagues said:

        "simplifies the JIRA installation and configuration process, which is the core purpose of these installers"

        Thanks for the response on these points regarding the JDK/JRE roles and functions Giles but I am even more confused if that is possible because most of this page is devoted to installing Java and setting JAVA_HOME to point to it.

        Taking your word as gospel then I would expect to find a warning or documentation prompting the administrator to abandon the unnecessary/ potential harmful installation of a separate jdk/jre as well as the importation of certificates to that truststore/cacerts file rather than a procedures on how to provide redundancy.

        I must be going loopy...

        Redundancy is one thing but conflict is quite another!


        26 Sep 2011
        1. User avatar


          ^Much agreed with the above comments.  You shouldn't instruct people to install and configure Java if its bundled.

          In addition, after upgrading from 4.2.2 to 4.4.1 on Win2008 when I try to start JIRA I receive the following litany of errors which contradict the claim that JD is not required:

          You have Issues!...

          JAVA_HOME "c:\Program Files (x86)\Java\jre6" contains spaces. Please change to a location without spances if this causes problems.


          The JAVA_HOME environment variable is not defined correctly

          The environment variable is needed to run this program

          NB: JAVA_HOME should point to a JDK not a JRE


          04 Oct 2011
          1. User avatar

            Giles Gaskell

            Hello there,

            Apologies for the confusion caused and thanks very much for highlighting this issue.

            We've made the note at the top of this page more prominent now, instructing people who intend to use the Windows and Linux Installers (to install JIRA) to ignore the instructions on this page.

            Furthermore, the Java section of the JIRA Requirements page has been amended to clarify which JIRA installers require you to install a Java platform beforehand and which installers don't.

            As for the issue you mentioned here:

            JAVA_HOME "c:\Program Files (x86)\Java\jre6" contains spaces. Please change to a location without spances if this causes problems.

            You might encounter this issue if you already had a Java platform installed on your OS, then used the Windows Installer to install JIRA and started JIRA from the command prompt.

            Have you tried starting JIRA using the shortcuts available from the Windows 'Start Menu' which might avoid this known issue in JIRA 4.4 (JRA-25632)?



            05 Oct 2011
  10. User avatar

    Rob Kearey

    A marked disadvantage to the bundled JRE is that you're taking the application out of band of all the regular updates and QA of the OS bundled JDK. For example, I have Oracle/Sun Java 1.6.0_29 happily installed on my Jira server, but the bundled version is _26, and thus is missing tzdata updates for Western Australia. It would be excellent if the installer version could be made aware of system Java, and run some sanity checks before installing.

    13 Dec 2011
  11. User avatar

    Jason 'Above Peak' Birch

    The linkage error mentioned for Fedora Core 4 hasn't happened for a very long time. There are no issues installing JDK 6 on Fedora 17.

    However, the Fedora repositories only carry OpenJDK (and OpenJDK 7 at that, on Fedora 17). Along with Maven 3, PostgreSQL 9, and a bunch of other things we don't yet support as of writing. If you have OpenJDK 7 install on Fedora, you can use the official Oracle RPM to install Java 1.6.0_u26 (Truth be told, it's an rpm.bin; make it executable and simply run it), and then use the alternatives command to change all your symlinks to point at Java 6.

    sudo alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_26/bin/java 20000

    Running that should also modify symlinks to everything else contained within the folder, so it should take care of javac, javaws, jar, etc. You can then proceed to set $JAVA_HOME as normal and continue on your merry way. If you ever want to change your simlinks you can run something like

    sudo alternatives --config java

    Which will take you through changing between any of your installed alternatives for the java command.


    01 May 2012
  12. User avatar


    I didn't catch this elsewhere and may have overlooked it, but The oracle JDK 7.0.4 will not work with the Jira 5 I installed.  Important plug-ins will not function under J7. I flipped back to the last version of JDK6 and everything was fine.

    18 May 2012
    1. User avatar

      Giles Gaskell

      Hi there,

      FYI - our Supported Platforms page shows which Java versions (in addition to other platforms such as operating systems and databases) are supported by JIRA.



      21 May 2012
  13. User avatar

    chanda norton

    this is crazy...terrible documentation

    04 Sep 2013
Powered by Confluence and Scroll Viewport