tr-pc icon indicating copy to clipboard operation
tr-pc copied to clipboard

Security Manager has been deprecated

Open RadekCap opened this issue 6 months ago • 1 comments

In Java 24+ has been Security Manager deprecated so currently it isn't possible to run application on these versions of java.

Deprecation is part of JEP-486 - https://openjdk.org/jeps/486

Below are finding from https://github.com/thinkingrock-gtd/tr-pc/pull/156

>System Info: 
  Product Version         = ThinkingRock 4.0.0.beta.1
  Operating System        = Mac OS X version 15.5 running on aarch64
  Java; VM; Vendor        = 24.0.1; OpenJDK 64-Bit Server VM 24.0.1+9; Azul Systems, Inc.
  Runtime                 = OpenJDK Runtime Environment 24.0.1+9
  Java Home               = /Applications/Apache NetBeans.app/Contents/Home
java.lang.UnsupportedOperationException: Setting a Security Manager is not supported
	at java.base/java.lang.System.setSecurityManager(System.java:286)
	at org.netbeans.TopSecurityManager.install(TopSecurityManager.java:525)
	at org.netbeans.core.NbLifecycleManager.advancePolicy(NbLifecycleManager.java:69)
	at org.netbeans.core.GuiRunLevel.run(GuiRunLevel.java:84)
	at org.netbeans.core.startup.Main.start(Main.java:316)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
	at java.base/java.lang.Thread.run(Thread.java:1447)
>Log Session: Thursday, June 19, 2025, 8:29:58 PM Central European Summer Time
>System Info: 
  Product Version         = ThinkingRock 4.0.0.beta.1
  Operating System        = Mac OS X version 15.5 running on aarch64
  Java; VM; Vendor        = 21.0.7; OpenJDK 64-Bit Server VM 21.0.7+6-LTS; Eclipse Adoptium
  Runtime                 = OpenJDK Runtime Environment 21.0.7+6-LTS
java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:430)
	at org.netbeans.TopSecurityManager.install(TopSecurityManager.java:525)
	at org.netbeans.core.NbLifecycleManager.advancePolicy(NbLifecycleManager.java:69)
	at org.netbeans.core.GuiRunLevel.run(GuiRunLevel.java:84)
	at org.netbeans.core.startup.Main.start(Main.java:316)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
	at java.base/java.lang.Thread.run(Thread.java:1583)

RadekCap avatar Jun 19 '25 18:06 RadekCap

@RadekCap Interesting. On linux, using the regular OpenJDK 24.0.1, I don't have the problem:

Image

ursjoss avatar Jun 19 '25 21:06 ursjoss