@Override
        public void run() {
            try {
                Thread.sleep(5000);
                // No matter what, we make sure it's dead
                System.out.println( "Openfire process forcefully killed." );
                System.exit(0);
            }
            catch (InterruptedException e) {
                // Ignore.
            }

        }
<p>Shuts down the JVM after a 5 second delay.</p>
xmppserver/src/main/java/org/jivesoftware/openfire/XMPPServer.java