Skip to content
Snippets Groups Projects
Commit b4bf46bb authored by David Georg Reichelt's avatar David Georg Reichelt
Browse files

Only add add-opens for Java versions bigger than 8

parent ddf36ac2
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,12 @@ MAIN_DIR="${BASE_DIR}/../.." ...@@ -11,7 +11,12 @@ MAIN_DIR="${BASE_DIR}/../.."
# Hotfix for ASPECTJ # Hotfix for ASPECTJ
# https://stackoverflow.com/questions/70411097/instrument-java-17-with-aspectj # https://stackoverflow.com/questions/70411097/instrument-java-17-with-aspectj
JAVA_VERSION=$(java -version 2>&1 | grep -oP 'version "?(1\.)?\K\d+')
if [ "$JAVA_VERSION" != "8" ]
then
export JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED" export JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED"
echo "Setting \$JAVA_OPTS, since Java version is bigger than 8"
fi
# #
# source functionality # source functionality
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment