public static void main(final String[] args) {

        try {
            final NameServerModule module = new NameServerModule();

            // Parse the command line options

            final Options options = new Options();
            options.addOption("?", "help", false,
                    NameServer.BUNDLE.getString("options.help"));
            options.addOption("v", "version", false,
                    NameServer.BUNDLE.getString("options.version"));
            options.addOption("h", "hostname", true,
                    NameServer.BUNDLE.getString("options.hostname"));
            options.addOption("p", "port", true,
                    NameServer.BUNDLE.getString("options.port"));

            final CommandLineParser parser = new GnuParser();

            final CommandLine line = parser.parse(options, args);

            // Display the version information

            if (line.hasOption("v")) {
                final String name = BUNDLE.getString("version.name");
                final String copyright = BUNDLE.getString("version.copyright");
                System.out.println(name);
                System.out.println(copyright);
                System.exit(0);
            }

            // Display the usage information

            if (line.hasOption("?")) {
                final String name = BUNDLE.getString("version.name");
                final String copyright = BUNDLE.getString("version.copyright");
                final String usage = BUNDLE.getString("version.copyright");
                System.out.println(name);
                System.out.println(copyright);
                System.out.println();
                System.out.println(usage);
                System.exit(0);
            }

            // Override the default hostname

            if (line.hasOption("h")) {
                final String hostname = line.getOptionValue("h");
                module.setHostname(hostname);
            }

            // Override the default port number

            if (line.hasOption("p")) {
                final String portNumberStr = line.getOptionValue("p");
                final int portNumber = Integer.valueOf(portNumberStr);
                module.setPortNumber(portNumber);
            }

            // Launch the server

            final Injector injector = Guice.createInjector(module);

            final NameServerEndpoint serverEndpoint = injector
                    .getInstance(NameServerEndpoint.class);

            serverEndpoint.run();

        } catch (final ParseException e) {
            // TODO: Decide on meaningful error message
            final String message = "";
            NameServer.LOGGER.error(message, e);
            System.exit(0);
        } catch (final NumberFormatException e) {
            // TODO: Decide on meaningful error message
            final String message = "";
            NameServer.LOGGER.error(message, e);
            System.exit(0);
        } catch (final Exception e) {
            // TODO: Decide on meaningful error message
            final String message = "";
            NameServer.LOGGER.error(message, e);
            System.exit(0);
        }
    }