Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-30-2005, 04:09 PM   PM User | #1
punx
New Coder

 
Join Date: Aug 2005
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
punx is an unknown quantity at this point
[Java] How to end a program?

How would you end a program to close it. In vb.net you use "End". Is there a command to terminate a program in Java without hitting enter in the consol till it closes?
punx is offline   Reply With Quote
Old 09-30-2005, 04:19 PM   PM User | #2
Brandoe85
teh Moderatorinator


 
Join Date: Sep 2004
Location: USA
Posts: 2,472
Thanks: 4
Thanked 40 Times in 40 Posts
Brandoe85 will become famous soon enough
Try:
System.exit(0);

that should do it.
__________________
-Brando
Why using tables for eating is stupid!
Brandoe85 is offline   Reply With Quote
Old 09-30-2005, 04:33 PM   PM User | #3
punx
New Coder

 
Join Date: Aug 2005
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
punx is an unknown quantity at this point
That worked. Thanks
punx is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:00 AM.


Advertisement
Log in to turn off these ads.