Skip to content

Commit

Permalink
Remove java.security.manager=allow from JDK 24
Browse files Browse the repository at this point in the history
Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Dec 11, 2024
1 parent 108e26b commit 242b0dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ 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
# the security manager in net.adoptopenjdk.loadTest.LoadTest.overrideSecurityManager.
# 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
Expand Down

0 comments on commit 242b0dd

Please sign in to comment.