Java SecurityManager [closed]
I just tried to use an empty Security File.
Although, System.exit(0);
does work.
Is there a way to eliminate this?
We're calling SecurityManager via CLI with our own empty policy file. And if I try System.exit(0);
in the main function, and after it some System.out or whatever, it will exit. I want to deny any System commands. We're going to include Code from another user soon, so it's bad, if the user can shut down the whole framework开发者_运维问答.
I'm assuming that you want to prevent System.exit()
from exiting the JVM process by supplying your custom security manager. Are you allowed to programatically set the SecurityManager
? If yes, you might find a few interesting suggestions in this thread.
精彩评论