This site requires JavaScript, please enable it in your browser!
Greenfoot back
fajrizarmy
fajrizarmy wrote ...

2013/1/20

how to exit greenfoot??

fajrizarmy fajrizarmy

2013/1/20

#
i have share my project into jar file..
Greenfoot.stop();
is not exit greenfoot.. it's just stop greenfoot.. how to exit greenfoot?
danpost danpost

2013/1/20

#
How about
System.exit();
fajrizarmy fajrizarmy

2013/1/20

#
thank you danpost.. right code is
System.exit(1);
danpost danpost

2013/1/20

#
Very good. However, you would use
System.exit(0);
for a normal exit. Non-zero amounts are used for when the program needs to be terminated for some reason other than, let us just say, that the user opts to terminate the program or the program has run its course to the end and shuts down normally.
You need to login to post a reply.