Windows Service failed to be created due to JAVA_HOME environment variable configuration

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

An attempt of running Confluence automatically on Windows as service is failing with the following errors shown in the command prompt window. 

The JAVA_HOME environment variable is not defined correctly. 
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

診断

Confluence's service.bat is the script that Confluence uses to allow this instance to run automatically as Windows Service in your machine. 

In the script itself, it would then first check if you have $JAVA_HOME set as an environment variable in your machine. Should you have it configured, it will then use this value to install your Confluence instance as service, however should you not have it configured, the script will then use the bundled JAVA that's shipped in your Confluence installation folder.

Please check the value of $JAVA_HOME configured in your Windows machine by executing the following command against the command prompt.

echo %JAVA_HOME%

原因

The $JAVA_HOME variable must be pointing to JDK (e.g c:\programs\java\jdk1.8.0_05) not JRE (e.g. c:\programs\java\jdk1.8.0_05\jre).

ソリューション

  1. Reconfigure $JAVA_HOME in your Windows machine to point to the installed JDK instead of the JRE folder.
  2. Start Confluence automatically on Windows as a Service by following the steps provided in this documentation.

最終更新日 2018 年 11 月 1 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.