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

This widget could not be displayed.

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.

This widget could not be displayed.

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 Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

85 views 1 0
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