Package org.kohsuke.args4j

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


    public static void main(String[] args) {
        Generator app = new Generator();

        CmdLineParser parser = new CmdLineParser(app);
        try {
            parser.parseArgument(args);
            Class<AbstractRenderEngine> renderClass = (Class<AbstractRenderEngine>) Class.forName(app.renderClass);
            Constructor ctor = renderClass.getConstructor(Integer.class, Integer.class, Integer.class, Boolean.class);
            AbstractRenderEngine renderer = (AbstractRenderEngine) ctor.newInstance(app.maxDimension, app.rotationAllowed, app.buffer, app.debug);

// new RenderEngine(app.maxDimension, app.rotationAllowed, app.buffer, app.debug);
View Full Code Here


//    log.info("s="+s);
   
    PlayOptions bean = new PlayOptions();
      CmdLineParser parser = new CmdLineParser(bean);
    try {
        parser.parseArgument(args);
    } catch( CmdLineException e ) {
        printErr(e.getMessage());
        printUsage(parser);
        System.exit(-1);
    }
View Full Code Here

    }

    private int run(String[] args) {
        CmdLineParser p = new CmdLineParser(this);
        try {
            p.parseArgument(args);
            run();
            return 0;
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            p.printUsage(System.err);
View Full Code Here

    }

    public int run(String[] args) throws Exception {
        CmdLineParser parser = new CmdLineParser(this);
        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            printUsage(parser);
            return -1;
        }
View Full Code Here

public class PurchaseLog {
    public static void main(String[] args) throws IOException {
        Options opts = new Options();
        CmdLineParser parser = new CmdLineParser(opts);
        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println("Usage: -count <number>G|M|K [ -users number ]  log-file user-profiles");
            return;
        }
View Full Code Here

//    log.info("s="+s);
   
    PlayOptions bean = new PlayOptions();
      CmdLineParser parser = new CmdLineParser(bean);
    try {
        parser.parseArgument(args);
    } catch( CmdLineException e ) {
        printErr(e.getMessage());
        printUsage(parser);
        System.exit(-1);
    }
View Full Code Here

    public static void main(String[] args) throws IOException, CmdLineException, InterruptedException, ExecutionException {
        final Options opts = new Options();
        CmdLineParser parser = new CmdLineParser(opts);
        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println("Usage: " +
                    "[ -count <number>G|M|K ] " +
                    "-schema schema-file " +
                    "[-quote DOUBLE_QUOTE|BACK_SLASH|OPTIMISTIC] " +
View Full Code Here

   public static void main(String[] args) throws SAXParseException, IOException {
      AnalyzeMatches self = new AnalyzeMatches();
      CmdLineParser parser = new CmdLineParser(self);
      try {
         parser.parseArgument(args);
         self.doMain();
      } catch (CmdLineException e) {
         System.err.println(e.getMessage());
         parser.printUsage(System.err);
      }
View Full Code Here

   public static void main(String[] args) throws SAXParseException, IOException {
      AnalyzePlaces self = new AnalyzePlaces();
      CmdLineParser parser = new CmdLineParser(self);
      try {
         parser.parseArgument(args);
         self.doMain();
      } catch (CmdLineException e) {
         System.err.println(e.getMessage());
         parser.printUsage(System.err);
      }
View Full Code Here

   public static void main(String[] args) throws SAXParseException, IOException {
      CompareMatches self = new CompareMatches();
      CmdLineParser parser = new CmdLineParser(self);
      try {
         parser.parseArgument(args);
         self.doMain();
      } catch (CmdLineException e) {
         System.err.println(e.getMessage());
         parser.printUsage(System.err);
      }
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.