How do I terminate a Java application?
Category: java.lang, viewed: 27505 time(s).
In an application we sometimes want terminate the execution of our application, for instance because it cannot find the required resource.
To terminate it we can use exit(status) method in java.lang.System class or in the java.lang.Runtime class. When terminating an application we need to provide a status code, a non-zero status assigned for any abnormal termination.
The call to System.exit(status) is equals to Runtime.getRuntime().exit(status). Actually the System class will delegate the termination process to the Runtime class.
Download Hundreds of Complimentary Industry Resources
Get hundreds of popular Industry magazines, white papers, webinars, podcasts, and more;
all available at no cost to you. With more than 600 complimentary offers, you'll find
plenty of titles to suit your professional interests and needs.
Click Here and Sign up today!


