Java Virtual Machine (JVM) Termination Example
Chapter:
Run Time
Last Updated:
17-06-2016 08:55:05 UTC
Program:
/* ............... START ............... */
public class JavaJVMTermination {
public static void main(String args[]) {
Runtime runtime = Runtime.getRuntime();
System.out.println("About to halt the current jvm");
runtime.halt(1);
System.out.println("JVM Terminated");
}
}
/* ............... END ............... */
Output
About to halt the current jvm
Tags
Java Virtual Machine (JVM) Termination, Java, Runtime