/** * Runs the chat master server. * * @param args Command line arguments */ public static void main(String[] args) { ChatServer server = null; if (args.length > 0) { try { server = new ChatServerImpl(Integer.parseInt(args[0])); } catch (NumberFormatException e) { printHelp(); System.exit(1); } } else { server = new ChatServerImpl(DEFAULT_PORT); } server.startServer(); }