System.exit(int status)
- Equivalent toRuntime.getRuntime().exit(status)
Runtime.exit(int status)
- Terminates the currently running JVM by initiating its shutdown sequence (run all registered shutdown hooks, and uninvoked finalizers, if necessary). Once this is done the JVM halts.Runtime.halt(int status)
- Forcibly terminates the currently running JVM.