Package org.kohsuke.args4j

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


   * @param args
   * @throws CmdLineException
   */
  public static void main(String[] args) throws UIMAException, IOException, CmdLineException {
    CmdLineParser optionParser = new CmdLineParser(options);
    optionParser.parseArgument(args);
   
    out = new PrintStream(options.outFile);
    List<File> trainFiles = Arrays.asList(options.trainDirectory.listFiles());
    if(sems == null){
      sems = new SemanticClasses(FileLocator.getAsStream("org/apache/ctakes/assertion/all_cues.txt"));
View Full Code Here


    private int doMain(String[] args) {
        CmdLineParser parser = new CmdLineParser(this);

        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {
            System.err.println(e.getMessage());
            usage();
            return -1;
        }
View Full Code Here

        final CmdLineOptions opts = new CmdLineOptions();
        CmdLineParser parser = new CmdLineParser(opts);

        // parse command line options, give error message if no arguments passed
        try {
            parser.parseArgument(args);
        } catch (Exception e) {
            parser.printUsage(System.err);
            return;
        }
        if (opts.arguments.isEmpty()) {
View Full Code Here

    }

    private int runApplication(String[] args) {
        CmdLineParser cmdLineParser = new CmdLineParser(this);
        try {
            cmdLineParser.parseArgument(args);

        } catch (CmdLineException e) {
            // if there's a problem in the command line,
            // you'll get this exception. this will report
            // an error message.
View Full Code Here

    CloudAdapterOptions arguments = new CloudAdapterOptions();
    CmdLineParser parser = new CmdLineParser(arguments);
    parser.setUsageWidth(80);

    try {
      parser.parseArgument(args);
    } catch (CmdLineException e) {
      log.error("error: " + e.getMessage());
      parser.printUsage(System.err);
      System.exit(-1);
    }
View Full Code Here

  public static void main(String[] args) {
    Params params = new Params();
    CmdLineParser parser = new CmdLineParser(params);
    try {
      parser.parseArgument(args);
    } catch (CmdLineException t) {
      usage(parser, t);
    }

    System.out.println("Gitblit Federation Client v" + Constants.getVersion() + " (" + Constants.getBuildDate() + ")");
View Full Code Here

    Params.baseFolder = folder;
    Params params = new Params();
    CmdLineParser parser = new CmdLineParser(params);
    try {
      parser.parseArgument(filtered);
      if (params.help) {
        reindex.usage(parser, null);
        return;
      }
    } catch (CmdLineException t) {
View Full Code Here

    Params.baseFolder = folder;
    Params params = new Params();
    CmdLineParser parser = new CmdLineParser(params);
    try {
      parser.parseArgument(filtered);
      if (params.help) {
        server.usage(parser, null);
      }
    } catch (CmdLineException t) {
      server.usage(parser, t);
View Full Code Here

    JoocConfiguration config = new JoocConfiguration();

    CmdLineParser parser = new CmdLineParser(config);
    try {
      // parse the arguments.
      parser.parseArgument(args);
    } catch (CmdLineException e) {
      StringBuilder msg = extendedUsage(parser, e);
      throw new CommandLineParseException(msg.toString(), -1);
    }
    return parseConfig(parser, config);
View Full Code Here

    FileLocations config = new FileLocations();

    CmdLineParser parser = new CmdLineParser(config);
    try {
      // parse the arguments.
      parser.parseArgument(args);
    } catch (CmdLineException e) {
      StringBuilder msg = new StringBuilder();
      // if there's a problem in the command line,
      // you'll get this exception. this will report
      // an error message.
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.