It's not a secret anymore!*
The moose likes Beginning Java and the fly likes Terminate a Java program. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Terminate a Java program." Watch "Terminate a Java program." New topic
Author

Terminate a Java program.

Gorakshanath Pandey
Greenhorn

Joined: Feb 25, 2004
Posts: 11
Simple Question..@ Is there a way to terminate a java program using
exit() or something on those line?
Thanking in anticipation...
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Do you mean, something like this?
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html# exit(int)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

Not a JDBC question, so off to the Java in General(beginner) forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Dani Atrei
Ranch Hand

Joined: Feb 17, 2004
Posts: 73
Just write System.exit(0);


Si altas son las torres, el valor es alto - Alberti
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Terminate a Java program.
 
Similar Threads
a simple for loop question
program termination
Exiting a Java Program
daemon thread
Java program terminates