public static void main(String... args) throws Exception {
    
        // Increase the logging level for networking...
        System.out.println("Setting logging to max");
        Logger networkLog = Logger.getLogger("com.jme3.network"); 
        networkLog.setLevel(Level.FINEST);
 
        // And we have to tell JUL's handler also   
        // turn up logging in a very convoluted way
        Logger rootLog = Logger.getLogger("");
        if( rootLog.getHandlers().length > 0 ) {
            rootLog.getHandlers()[0].setLevel(Level.FINEST);
        }
                
        // Note: in JME 3.1 this is generally unnecessary as the server will
        // send a message with all server-registered classes.
        // TestChatServer.initializeClasses();
        // Leaving the call commented out to be illustrative regarding the
        // common old pattern.

        // Grab a host string from the user
        String s = getString(null, "Host Info", "Enter chat host:", "localhost");
        if (s == null) {
            System.out.println("User cancelled.");
            return;
        }

        // Register a shutdown hook to get a message on the console when the
        // app actually finishes
        Runtime.getRuntime().addShutdownHook(new Thread() {
                @Override
                public void run() {
                    System.out.println("Chat client is terminating.");
                }
            });


        TestChatClient test = new TestChatClient(s);
        test.setVisible(true);
    }
A simple test chat server.  When SM implements a set
 of standard chat classes this can become a lot simpler.

 @version   $Revision$
 @author    Paul Speed
jme3-examples/src/main/java/jme3test/network/TestChatClient.java