public static void main(String[] args) {
        
        final int port;
        
        if(args.length == 0) {
            port = DEFAULT_PORT;
        } else if(args.length == 1) {
            try {
                port = Integer.parseInt(args[0]);
            } catch (NumberFormatException e) {
                System.err.println("Port number error: " + args[0]);
                return;
            }
        } else {
            System.err.println("Incorrect arguments count (" + args.length + ").");
            return;
        }
                
        try {
            Server s = new Server(port);            
            s.start();            
        } catch(Exception e) {
            System.err.println(e.getMessage());
            System.exit(1);
        }

    }