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.
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:
#!/bin/sh
_EXPECTED_JAVA_VERSION="8"
#
# 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" ]
then
echo "*************************************************************************************************************************************"
echo "********** Wrong JVM version! You are running with "$ignore1"."$version"."$ignore2" but JIRA requires at least 1.8 to run. **********"
echo "*************************************************************************************************************************************"
exit 1
fi
)
.... and so on...
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nick,
Has that fact changed since you wrote that? Our firm is on the path towards OpenJDK and I have not come across any definitive news of Atlassian support for that. I trust your insight so I am asking you first.
Regards,
Ron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do the Jira 7.13.x release notes help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.