You need to have a security configuration file with this as well or override some methods on the SecurityManager that check to see if you're allowed to call System.exit(int);

// Json