To ensure that your program shuts down properly, issue System.exit(0) as the last instruction before your Java™ program ends.
IBM® Toolbox for Java connects to the server with user threads. Because of this, a failure to issue System.exit(0) may keep your Java program from properly shutting down.
Using 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.