zentol commented on code in PR #23547:
URL: https://github.com/apache/flink/pull/23547#discussion_r1370226659
##########
flink-dist/src/main/flink-bin/bin/config.sh:
##########
@@ -334,6 +334,12 @@ if [ -z "${FLINK_ENV_JAVA_OPTS}" ]; then
# Remove leading and ending double quotes (if present) of value
FLINK_ENV_JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions $( echo
"${FLINK_ENV_JAVA_OPTS}" | sed -e 's/^"//' -e 's/"$//' )"
+
+ JAVA_SPEC_VERSION=`"${JAVA_RUN}" -XshowSettings:properties 2>&1 | grep
"java.specification.version" | cut -d "=" -f 2 | tr -d '[:space:]'`
+ if [ "$JAVA_SPEC_VERSION" == "21" ]; then
+ # set security manager property to allow calls to
System.setSecurityManager() at runtime
+ FLINK_ENV_JAVA_OPTS="$FLINK_ENV_JAVA_OPTS -Djava.security.manager=allow"
+ fi
Review Comment:
How compatible is this across JDK vendors?
This is gonna be annoying maintenance-wise because java 18,19,20 and 22 will
all fail out-of-the-box.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]