VSNetBeans: Disable SecurityManager [compat:jdk19-24]. Avoid repeated starts on failure.#8159
Conversation
lahodaj
left a comment
There was a problem hiding this comment.
I didn't test all the combinations, but I did try some cases, and it seems reasonable to me.
|
Maybe I am missing something but should not automatically skip this when running on Java 21, since it is guaranteed to throw this exception? I just triedant tryme on trunk and it failed for this reason, which seems like a pretty basic problem.
|
|
Hi @jglick!
SM itself works fine up until JDK 23 (inclusive) (outside of deprecation warnings and that JDK 18 made 'disallow' the default which can still be changed to 'allow'). NB 24 can be built and run on JDK 17-23 with SM still active. JDK 24 is more interesting since it disabled SM. If you grab a dev build from master, you can start it on JDK 24 as experiment if you replace Might be good to add VSNetbeans to the title so that this is not confused with classic NB - since NB doesn't restart ;) |
|
Cherrypicked into |
This should go to VSNetbeans release branch as well.
This PR fixes two issues:
The option controlling SecurityManager is missing from the NBLS app configuration. For compatibility with JDK24, I've decided to disable
TopSecurityManagercompletely (-J-DTopSecurityManager.disable=true).This patch changes the startup so that automatic restart after 10sec happes ONLY if the language server initializes correctly; if it fails to start completely, it is not respawned.
If you test this, please test:
"netbeans.javaSupport.enabled"that should purposely restart NBLS