Skip to content

Commit

Permalink
Bugfix java 17 support per atlassian upstream
Browse files Browse the repository at this point in the history
See https://jira.atlassian.com/browse/JRASERVER-76224 for details on this. This snippet was taken directly from the setenv.sh script from JIRA 9.11.1.
  • Loading branch information
valentino-aguiar-gsa authored Jan 12, 2024
1 parent b3d8604 commit 5ac7cbd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/setenv.sh.epp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ fi

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JVM_CODE_CACHE_ARGS} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${DISABLE_NOTIFICATIONS} ${JVM_SUPPORT_RECOMMENDED_ARGS} ${JVM_EXTRA_ARGS} ${JIRA_HOME_MINUSD} ${START_JIRA_JAVA_OPTS}"

j_ver=`echo "$($JAVA_HOME/bin/java -version 2>&1)" | grep "version" | awk '{ print substr($3, 2, length($3)-2); }'`
IFS='.' read -a j_ver_parts <<< "$j_ver"

if [[ ${j_ver_parts[0]} = 17 ]]; then
JVM_OPENS=$(cat $PRGDIR/java-opens.txt)
JAVA_OPTS="$JVM_OPENS $JAVA_OPTS"
fi

export JAVA_OPTS

# DO NOT remove the following line
Expand Down

0 comments on commit 5ac7cbd

Please sign in to comment.