开发者

Java SecurityManager [closed]

开发者 https://www.devze.com 2023-03-27 02:31 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消