...
This noncompliant example calls System.exit()
aiming to forcefully shutdown the JVM and terminate the running process. There is no No security manager check which is highly inadvisablechecks have been installed to check whether the program has sufficient permissions to exit.
Code Block | ||
---|---|---|
| ||
public class InterceptExit { public static void main(String[] args) { System.out.println("Regular code block"); System.exit(1); //abrupt exit call System.out.println("This is never executed"); } } |
...