From 242b0ddafda559f0d6013392814bcd5d48c11742 Mon Sep 17 00:00:00 2001 From: Theresa Mammarella Date: Wed, 11 Dec 2024 14:43:57 -0500 Subject: [PATCH] Remove java.security.manager=allow from JDK 24 Signed-off-by: Theresa Mammarella --- system/system.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/system.mk b/system/system.mk index 1e00f5dd1f..7eb60d2cf6 100644 --- a/system/system.mk +++ b/system/system.mk @@ -47,6 +47,7 @@ else OPENJ9_PRAM="" endif +# In JDK 24+ any attempts to enable the security manager will result in an error # In JDK18+, java.security.manager == null behaves as -Djava.security.manager=disallow. # In JDK17-, java.security.manager == null behaves as -Djava.security.manager=allow. # In case of system tests, the base infra (STF) which is used to launch tests utilizes @@ -54,7 +55,7 @@ endif # For system tests to work as expected, -Djava.security.manager=allow behaviour is # needed in JDK18+. # Related: https://github.com/eclipse-openj9/openj9/issues/14412 -ifeq ($(filter 8 9 10 11 12 13 14 15 16 17, $(JDK_VERSION)),) +ifneq ($(filter 18 19 20 21 22 23, $(JDK_VERSION)),) export JAVA_TOOL_OPTIONS:=-Djava.security.manager=allow $(warning Environment variable JAVA_TOOL_OPTIONS is set to '$(JAVA_TOOL_OPTIONS)') endif