AS/400 Toolbox for Java \ Tips for programming \ Shutdown

Shutting down your Java program

To ensure that your program shuts down properly, issue System.exit(0) as the last instruction before your Java program ends.

AS/400 Toolbox for Java connects to the AS/400 with user threads. Because of this, a failure to issue System.exit(0) may keep your Java program from properly shutting down.

Start changeUsing System.exit(0) is not a requirement, but a precaution. There are times that you must use this command to exit a Java program and it is not problematic to use System.exit(0) when it is not necessary.End change


[ Information Center Home Page | Feedback ] [ Legal | AS/400 Glossary ]