Skip to content
Snippets Groups Projects
Commit 2216a2e1 authored by Reiner Jung's avatar Reiner Jung
Browse files

Fixing java version detection.

parent 68230f18
No related branches found
No related tags found
No related merge requests found
......@@ -11,10 +11,8 @@ MAIN_DIR="${BASE_DIR}/../.."
# Hotfix for ASPECTJ
# https://stackoverflow.com/questions/70411097/instrument-java-17-with-aspectj
JAVA_VERSION=$(java -version 2>&1 | grep -o 'version "[0-9]*' | sed 's/.*"\([0-9]*\)/\1/g')
java -version
echo $JAVA_VERSION
if [ "${JAVA_VERSION}" != "8" ] ; then
JAVA_VERSION=$(java -version 2>&1 | grep version | sed 's/^.* "\([0-9\.]*\).*/\1/g')
if [ "${JAVA_VERSION}" != "1.8.0" ] ; then
export JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED"
echo "Setting \$JAVA_OPTS, since Java version is bigger than 8"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment