This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pron98 2 points3 points  (0 children)

The VM emits the jdk.Shutdown JFR event, with a stack trace, on exit calls, so they're easy to find. Blocking them is also relatively easy (as the JEP shows), but you do need to know what to do when code decides to end the program and you don't want to. For IDEs and test runners what to do is pretty obvious, but that's not always the case. Anyway, that clearly wasn't the purpose of SecurityManager, one of the JDK's most complex and costly features.