It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Use AdoptOpenJDK 11.0.4 with Jira Server 8.4.1 Edited

The supported platforms page for Jira 8.4 (https://confluence.atlassian.com/adminjiraserver/supported-platforms-938846830.html) indicates that AdoptOpenJDK 11 is supported.  However, I can't seem to get the Jira service to start on Windows using version 11.0.4 of the JDK.  I have run C:\Program Files\Atlassian\JIRA\bin\tomcat8w.exe //ES//JIRASoftwareNNNNNNNNNNNN, and configured the Java Virtual Machine setting to be C:\Program Files\AdoptOpenJDK\jdk-11.0.4.11-hotspot\bin\server\jvm.dll.  However, when I try to start the service, it crashes.  In the commons-daemon log file, I am getting the following entries:

[info]  Starting service...
[error] The system cannot find the file specified.
[error] Failed to start Java
[error] ServiceStart returned 4
[info] Run service finished.

Am I missing something?  How can I make Jira run using AdoptOpenJDK 11.0.4? 

1 answer

1 accepted

0 votes
Answer accepted
DPK J Community Leader Sep 20, 2019

@Jeffrey GullettWhat I would recommend is,

  • Install AdoptJDK 11 on machine,
  • Set JAVA_HOME environment variable and point it to AdoptJDK 11 installation location.
  • Simply start Jira with <JIRA_INSTALLATION>/bin/start-jira.bat executable script.

Unfortunately, that suggestion will run the Jira service using the JDK delivered with Jira, which at present is some version of Java 8.  My question is how to run using Java 11, which your answer doesn't address.  To rephrase the question, how can I download the atlassian-jira-software-8.4.1.zip archive, extract it, and get it running on a Windows machine with AdoptOpenJDK 11.0.4 (which is listed under supported platforms) as the only available version of Java?

DPK J Community Leader Sep 23, 2019

@Jeffrey Gullett  once you set JAVA_HOME environment variable, Jira will automatically pickup up that up, and will not use internal Java shipped with it.

There are multiple observations I have made that would indicate the statement (paraphrased) "Setting the JAVA_HOME environment variable prevents Jira from using the bundled version of Java" is false.  They are:

1) If setting JAVA_HOME forced Jira to "not use internal Java shipped with it", then I should be able to delete the JRE directory installed with Jira, and Jira should run without issue.  That isn't the observed behavior.  Deleting the JRE directory within the Jira installation prevents Jira from starting up, even with JAVA_HOME set appropriately.

2) I generated self-signed certificates to secure our Jira/Bitbucket instances.  I have installed these certificates into the AdoptOpenJDK 11 trust store.  When I don't delete the JRE directory, and start Jira with JAVA_HOME pointing to the AdoptOpenJDK 11 installation directory, I get a bunch of certificate errors (specifically with application links between Bitbucket and Jira).  My assertion is that these errors are the result of Tomcat using the bundled JRE, which hasn't been setup to trust my self-signed certificates.  If I run the tomcat8w.exe command indicated in my original post using AdoptOpenJDK 8, Jira starts up and all application links work correctly.

3) Running the "tomcat8w.exe //ES//JIRASoftwareNNNNNNNNNNNN" command from the Jira installation reports that the configured JRE is something like "..\..\jre\bin\server\jvm.dll" (I can't see the actual value this was set to by the installer, because I have since changed it to point to an AdoptOpenJDK 8 path based on JAVA_HOME.  However, I know with certainty that this path was hard-coded to some relative path to the JRE bundled with Jira).

So, to summarize the observed behavior (note that * indicates any value)...

Jira Observed Behavior.png

All of these observations support my assertion that tomcat is run using the bundled JRE, regardless of what JAVA_HOME is set to, unless you additionally run the tomcat8w.exe modification indicated in my original post.  If there is evidence to suggest otherwise, please present it here.

One final note... in the README.txt delivered with the zipped version of Jira (atlassian-jira-software-8.4.1.zip), the first step reads "Install Oracle's Java Development Kid (JDK) or Java Runtime Environment (JRE) 8, or AdoptOpenJDK 8."  It's possible this file simply didn't get updated when they added Java 11 support, but it seems equally possible given my observations that Java 11 isn't yet fully supported.

I hope that I am wrong, and that it is possible to setup Jira with Java 11, but so far it looks like Java 11 is only partially supported.  Thanks.

DPK J Community Leader Sep 23, 2019

Let check this on some VM and come back to you.

I opened a support request with Atlassian, and they figured out that it was because I failed to follow the instructions in the giant yellow box if attempting to use Java 9+: https://confluence.atlassian.com/jirakb/how-to-use-a-jdk-or-jre-exclusively-on-jira-765594330.html.  When configuring tomcat with Java 9+, you have to change the JVM options in addition to changing the JVM path.

DPK J Community Leader Sep 24, 2019

That is greate @Jeffrey Gullett 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

260 views 1 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you