0

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.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
Philipp Spiess
  • 3,263
  • 4
  • 26
  • 34

1 Answers1

1

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.

Community
  • 1
  • 1
Sanjay T. Sharma
  • 22,857
  • 4
  • 59
  • 71