Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to RELEASE250 with Java 21 causes java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release #8395

Closed
jdsmithsos opened this issue Apr 4, 2025 · 3 comments
Labels
kind:bug Bug report or fix Platform [ci] enable platform tests (platform/*)

Comments

@jdsmithsos
Copy link

jdsmithsos commented Apr 4, 2025

Apache NetBeans version

Apache NetBeans 25

What happened

Using Java 21.
When upgrading the NetBeans version from RELEASE240 to RELEASE250.
The application project build completed successfully with no compile errors.
When running the successfully rebuilt project, get the following exception:

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)

I am using the NetBeans IDE version 25, which is also running on Java 21. The IDE works perfectly without startup error.

Language / Project Type / NetBeans Component

Java Maven application

How to reproduce

In the project Maven pom.xml change the netbeans.version to RELEASE250, rebuild, and run

Did this work correctly in an earlier version?

Apache NetBeans 24

Operating System

Windows 11

JDK

21

Apache NetBeans packaging

Apache NetBeans platform

Anything else

No response

Are you willing to submit a pull request?

No

@jdsmithsos jdsmithsos added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Apr 4, 2025
@jdsmithsos
Copy link
Author

I found a workaround.
In the application launcher.conf add

-J-DTopSecurityManager.disable=true

to default_options:

default_options="--branding saloonsadmin -J-Xms512m -J-Xmx1024m -J-DTopSecurityManager.disable=true"

@mbien mbien added Platform [ci] enable platform tests (platform/*) and removed needs:triage Requires attention from one of the committers labels Apr 7, 2025
@mbien
Copy link
Member

mbien commented Apr 7, 2025

this is resolved via #7928 (#8258) in NB 26. (-J-DTopSecurityManager.disable=true will become a no-op)

The PR was originally planned to target NB 25, but it was decided last minute to do one more release while disabling SM (#8169).

@mbien
Copy link
Member

mbien commented Apr 7, 2025

added a note to the release notes https://github.com/apache/netbeans/releases/tag/25

@mbien mbien closed this as completed Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix Platform [ci] enable platform tests (platform/*)
Projects
None yet
Development

No branches or pull requests

2 participants