Documentation for Confluence 5.4.
Documentation for Confluence OnDemand and earlier versions of Confluence is available too.

Skip to end of metadata
Go to start of metadata

(info) This information is only relevant if you are installing Confluence on a Windows server.

After you have installed the Java Runtime Environment (JRE) in Windows, you must set the JAVA_HOME environment variable to point to the JRE installation directory.

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:

  1. 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 directory C:\Program Files\Java.
  2. 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:

  1. Right-click the My Computer icon on your desktop and select Properties.
  2. Click the Advanced tab.
  3. Click the Environment Variables button.
  4. Under System Variables, click New.
  5. Enter the variable name as JAVA_HOME.
  6. 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.

      Icon

      Note for Windows users on 64-bit systems

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

  7. Click OK.
  8. Click Apply Changes.
  9. Close any command window which was open before you made these changes, and open a new command window. There is no way to reload environment variables from an active command prompt. If the changes do not take effect even after reopening the command window, restart Windows.
  10. If you are running the Confluence EAR/WAR distribution, rather than the regular Confluence distribution, you may need to restart your application server.

 

Related Topics

Starting Tomcat as a Windows Service
Installing Confluence in Linux

31 Comments

  1. You should update scrnshots to reflect newer versions of jdk
    Or make a note of what the latest recommended version required

    Also, Java installs from Sun put things und c:/program files/java/JDK...  and /JRE...
    This is different from what you show here

    Does a path with spaces have an impact on this?

    I think that setting home variables in Win requires dos 8 char names, not sure though

    1. Hi Mark,

      Thanks for the feedback.
      The following pages provide information regarding the supported Java version for Confluence:

      To my understanding, there shouldn't be any big issue regarding path with spaces. However, it is always recommended to use 8 char names in Windows or avoid using white spaces for paths.

      Cheers,
      Tony

  2. Anonymous

    I am trying to install Confluence in my system.I have all prerequisite softwares and database needed for installation.I am following the steps as guided in the Installation Guide.But I am getting while running the startup.bat file. It is not giving any error message in log files,but i am not getting the "welcome page" from where i am supposed to proceed for installation purpose.But yes i am getting one message saying "init unable to setup application config : no home set"..................Is my problem is because of this only?Please help me out of this problem asap.

    Thanks,

    Mrinal

    1. Hi Mrinal,

      As far as I am concerned, the error message "init unable to setup application config : no home set" is normal for a fresh Confluence installation. Confluence will then proceed to create a Home Directory for Confluence. I would suggest you to raise a support request at http://support.atlassian.com, and attach a zip of <confluence-install>/logs, <confluence-home>/logs and advice the detailed steps that you have taken to install Confluence. Hope this helps.

      Cheers,
      Azwandi

  3. Hi,

    It might be due to some reasons - here is a list that I think is related:

    • You have not closed all the command prompt windows. Even better, restart Windows (smile)
    • It is pointing to a JRE, not a JDK

    If that does not help, you can configure the variable for Confluence only by adding this line at the top of <conf-install>/bin/setenv.bat:

    Example

    Note that this would only work if you start up Confluence via <conf-install>/bin/startup.bat.

    Hope that helps.

    Cheers,
    Azwan

    1. Anonymous

      Ty! This one did the job!

      Instead of: C:\Progra~1\Java\jre6
      I used:C:\Progra~1\Java\jdk1.7.0_07

      1. JDK 1.7 is not supported by Atlassian prior to JIRA 5.2: Supported Platforms

  4. Anonymous

    Folks,

    Your install (atlassian-confluence-2.10.3-evaluation.exe) states that a JRE is required. Based on your documentation, it's clear that a JDK is required, plus a JAVA_PATH environment variable. Please update the install to mention these two details.

    Sincerley,

    Eric Terrell

    vrbo.com

  5. Anonymous

    I mean a JAVA_HOME environment variable.

  6. Got the error message saying "JRE" during confluence install on a machine that has JRE but does not have the JDK.  Reailzing the missing JDK is the issue - went to SUN to download one, but there's more than one available.  See link shown here.  I am guessing the one that sites EE and Web 2.0 apps is the best, but really I'm just guessing.  Which JDK should users download from the list shown at this link:

    http://java.sun.com/javase/downloads/index.jsp

    Inquiring minds would like to know ...

  7. Anonymous

    Screen captures and directions are not very helpful for windows vista

  8. Anonymous

    I got the same error, needed to restart windows...otherwise when you check the env variables from CMD ...SET these only showed up after restart and everything worked

    Vrezh A

  9. Anonymous

    It's probably worth mention that Confluence instances that are installed as a windows service need to have the service removed and reinstalled in order to point the instance to a new JDK.

  10. Anonymous

    Install both the JDK and the JRE ( on a fresh windows install ).  Create JAVA_HOME variable with the path to the JDK and the JAVA_JRE variable with the path to the JRE folder.  IE:  C:\progra~1\java\JDK_someversion as the path for JAVA_HOME and C:\progra~1\java\jre as the path for JAVA_JRE

    Make sure to set both variables, worked for me under windows 2003 R2 Ent

    1. Upon doing an in-place upgrade, I found I had to do what the commenter above suggested – set both a JAVA_HOME variable and a JAVA_JRE variable. Frustrating that it took 2 hours to finally figure this out and try it. But it worked. My settings (on Windows 2008 R2):

      • JAVA_HOME = C:\Program Files\Java\jdk1.7.0_21
      • JAVA_JRE = C:\Program Files\Java\jdk1.7.0_21\jre
  11. Anonymous

    Thank you. Huge help!!  I was finally able install Android SDK Tools on my Windows 7 64bit system after setting new environment called JAVA_HOME point to path variable C:\Program Files\Java\jre7.  

     

    1. I'm so glad these docs helped. (smile)

  12. Anonymous

    thank u a lot it was very usefull and it worked for me

  13. Anonymous

    This didnt help. I looked for the envriornment thingy but it wasnt there!!!

  14. Anonymous

    Thanks man! helped me a lot! (big grin)

  15. I just followed the instructions and it worked like a charm. A little disappointed that this step is necessary – 64-bit Windows servers are the standard now – but at least I could help myself to the solution.

  16. Anonymous

  17. Anonymous

    Greats. . .it works. . .thanks a lot!. (smile)

  18. Anonymous

    Actually there is a way to check using CMD if an environment variable has been set. There are two ways you could check.

     cd %JAVA_HOME%

    The above would show something like: 
    C:\Users\Plutonium>cd %JAVA_HOME%
    C:\Program Files (x86)\Java\jre7>

    You could also use SET J
    That would show something like:
    C:\Program Files (x86)\Java\jre7>set J
    JAVA_HOME=C:\Program*6)\Java\jre7

    r4p3.net

  19. Anonymous

  20. Anonymous

    I (Windoze non-expert) got no "My Computer" icon on my Windoze. Also my German Systemsteuerung seems not to have system variables.

  21. Anonymous

    I have installed my jdk in E drive... explain the procedure to set class path with screen shots

  22. Anonymous

    It is on Computer>Properties>Advanced System Properties ...

  23. Anonymous

    http://superuser.com/questions/429699/unable-to-install-android-for-windows-7-because-jdk-is-not-found 

     

    I can't believe it was that easy! After renaming java.exe to java2.exe under /windows/system32, VIOLA!!!! Enjoy.

  24. Anonymous

    Thanks so much, it solve my problem.

  25. Anonymous

    try it with concept.it will take time but solved