Package org.kohsuke.args4j

Examples of org.kohsuke.args4j.CmdLineParser.printUsage()


        }
      }
    } catch (CmdLineException e) {
      err.println(e.getMessage() + "\n");
      parser.setUsageWidth(120);
      parser.printUsage(err);
      throw new CmdLineException("Exiting...");
    }
  }

  private void postParse() throws CmdLineException {
View Full Code Here


        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            System.err.println("java UDPSyncServer [options]");
            parser.printUsage(System.err);
            System.err.println();
            return;
        }

        try {
View Full Code Here

            }
        } catch (CmdLineException e) {
            System.err.println("INVALID INVOCATION: " + e.getMessage());
            System.err.println("Arguments: " + Strings2.join(args, " "));
            System.err.println("Usage:");
            parser.printUsage(System.err);
            throw e;
        } catch (Exception e) {
            System.err.println("INVALID INVOCATION: " + e.getMessage());
            System.err.println("Arguments: " + Strings2.join(args, " "));
            e.printStackTrace();
View Full Code Here

        try{
            parser.parseArgument(args);
        }
        catch(CmdLineException ex){
            System.err.println(ex.getMessage());
            parser.printUsage(System.err);
            throw ex;
        }

        if(this.isHelp()){
            parser.printUsage(System.out);
View Full Code Here

            parser.printUsage(System.err);
            throw ex;
        }

        if(this.isHelp()){
            parser.printUsage(System.out);
        }
    }

    /**
     * Returns the host of the URI the request is to be sent to
View Full Code Here

            parser.parseArgument(args);
            launcher.run();
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            System.err.println("java -jar slave.jar [options...]");
            parser.printUsage(System.err);
            System.err.println();
        }
    }

    public void run() throws Exception {
View Full Code Here

        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            options.printUsage();
            parser.printUsage(System.err);
            return;
        }

        aloe.factory.setOptions(options);
        aloe.factory.initialize();
View Full Code Here

    try {
      parser.parseArgument(args);
    } catch (CmdLineException e) {
      System.err.println(e.getMessage());
      System.err.println("java -jar program-name.jar [options...] arguments...");
      parser.printUsage(System.err);
      return;
    }
    new DotGenerator(options);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.