code: public static void main(String[] args) throws Exception {
          setCustomErrStream();
  
          CommandLine cmdLine = null;
          try {
              cmdLine = new CommandLine(args != null ? Arrays.copyOf(args, args.length) : null);
  
          } catch (final Exception e) {
          	// Cant use the CommandLine help here as the 
          	// i18n messages wont have been loaded
              System.out.println("Failed due to invalid parameters: " + Arrays.toString(args));
              System.out.println(e.getMessage());
              System.out.println("Use '-h' for more details.");
              System.exit(1);
          }
  
          ZapBootstrap bootstrap = createZapBootstrap(cmdLine);
          try {
              int rc = bootstrap.start();
              if (rc != 0) {
                  System.exit(rc);
              }
  
          } catch (final Exception e) {
              logger.fatal(e.getMessage(), e);
              System.exit(1);
          }
  
      }
docs: Main method
  
  @param args
  the arguments passed to the command line version
  @throws Exception
  if something wrong happens