options.addOption("s", "server", true, "host[:port] of server to connect to");
options.addOption("u", "url", true, "http[s]:
    public static void main(String args[]) throws IOException, ParseException {        Zimbra.toolSetup();                ZMailboxUtil pu = new ZMailboxUtil();        CommandLineParser parser = new GnuParser();        Options options = new Options();        options.addOption("h", "help", false, "display usage");        options.addOption("s", "server", true, "host[:port] of server to connect to");        options.addOption("a", "account", true, "account name (not used with --ldap)");        options.addOption("p", "password", true, "password for account");        options.addOption("v", "verbose", false, "verbose mode");        options.addOption("d", "debug", false, "debug mode");                        CommandLine cl = null;        boolean err = false;                try {            cl = parser.parse(options, args, true);        } catch (ParseException pe) {            System.err.println("error: " + pe.getMessage());            err = true;        }                    if (err || cl.hasOption('h')) {            pu.usage();        }                pu.setVerbose(cl.hasOption('v'));        if (cl.hasOption('s')) pu.setServer(cl.getOptionValue('s'));        if (cl.hasOption('a')) pu.setAccount(cl.getOptionValue('a'));        if (cl.hasOption('p')) pu.setPassword(cl.getOptionValue('p'));        if (cl.hasOption('d')) pu.setDebug(true);        args = cl.getArgs();                try {            pu.initMailbox();            if (args.length < 1) {                pu.interactive();            } else {                try {                    if (!pu.execute(args))                        pu.usage();                } catch (ArgException e) {                    pu.usage();                }            }        } catch (ServiceException e) {            Throwable cause = e.getCause();            System.err.println("ERROR: " + e.getCode() + " (" + e.getMessage() + ")" +                     (cause == null ? "" : " (cause: " + cause.getClass().getName() + " " + cause.getMessage() + ")"));              System.exit(2);        }    }