Browse Source

allow security manager setting on all versions above Java 18 (inclusive)

master
Jaikiran Pai 2 years ago
parent
commit
bbe6859b2f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/script/ant

+ 2
- 2
src/script/ant View File

@@ -369,8 +369,8 @@ else
fi
fi
# Run "java -XshowSettings:properties" and check the output for "java.specification.version" value
JAVA_SPEC_VERSION=`"$JAVACMD" -XshowSettings:properties 2>&1 | grep "java.specification.version = " | tr -d '[:space:]'`
if [ "$JAVA_SPEC_VERSION" = "java.specification.version=18" ] || [ "$JAVA_SPEC_VERSION" = "java.specification.version=19" ]; then
JAVA_SPEC_VERSION=$("$JAVACMD" -XshowSettings:properties 2>&1 | grep "java.specification.version = " | tr -d '[:space:]java.specification.version=')
if [ "$JAVA_SPEC_VERSION" -ge 18 ]; then
# set security manager property to allow calls to System.setSecurityManager() at runtime
ANT_OPTS="$ANT_OPTS -Djava.security.manager=allow"
fi


Loading…
Cancel
Save