Jira and OpenJDK

I've seen conflicting web pages on whether or not OpenJDK[7,8] is currently supported. Could someone please clarify whether or not it is?

More specifically, I'm trying to get a server started on a FreeBSD11 server (in a jail, if that matters) and I'm getting stopped at the error of:

Wrong JVM version! You are running with .. but JIRA requires at least 1.8 to run.

PLEASE NOTE that the check-java.sh script wasn't able to identify the version, causing the startup script to halt.

However, I *do* have openjdk installed:

openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

So I wonder if I'm really stuck here, or if there's a way for me to get around this error.

2 answers

Hmm.  Whereever you found tha pages that suggested OpenJDK is supported, I'd suggest you stop using them for help and advice because they're wrong.

Oracle Java is the only supported one.  OpenJDK can work, in some cases, but it is absolutely not supported.

Sorry, hit enter too soon:

To make it at least try to start the system with OpenJDK, you will need to amend the scripts in /bin, such that they look in the right place and perform different checks for Java.  setenv.sh and start-jira.sh are the main ones from memory.  That will get Tomcat running, but once it gets to Jira, all bets are off - it will probably appear to work for the basics, and may even work fine overall, but most add-ons will fail.

0 votes

The problem is that openJDK does not print 'java version' but 'openJDK version' and the provided script does not grep for that. I assume openJDK is compatible? After I fixed the issue it seemed to work just fine.

The below is some scratch code (with some diagnostic lines left in, sorry) that fixes the issue on my machine -all I've done is truncate the search string, but I'm sure you can produce a neater and safer fix - its just to show the priniple:




# check for correct java version by parsing out put of java -version
# we expect first line to be in format 'java version "1.8.0_40"' and assert that minor version number will be 8 or higher
echo $_RUNJAVA
set -x
"$_RUNJAVA" -version
set +x

"$_RUNJAVA" -version 2>&1 | grep "version" | (
IFS=. read ignore1 version ignore2
if [ ! ${version:-0} -ge "$_EXPECTED_JAVA_VERSION" ]
echo "*************************************************************************************************************************************"
echo "********** Wrong JVM version! You are running with "$ignore1"."$version"."$ignore2" but JIRA requires at least 1.8 to run. **********"
echo "*************************************************************************************************************************************"
exit 1

.... and so on...

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,861 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot