Examples of printHelp()


Examples of org.apache.accumulo.core.util.shell.Shell.Command.printHelp()

    for (String cmd : cl.getArgs()) {
      final Command c = shellState.commandFactory.get(cmd);
      if (c == null) {
        shellState.getReader().printString(String.format("Unknown command \"%s\".  Enter \"help\" for a list possible commands.%n", cmd));
      } else {
        c.printHelp(shellState, numColumns);
      }
    }
    return 0;
  }
 
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

        System.exit(2);
    }
    if (commands.hasOption('h')) {
      if (constart) {
        HelpFormatter hf = new HelpFormatter();
        hf.printHelp("java org.gudy.azureus2.ui.common.Main", "Optionally you can put torrent files to add to the end of the command line.\r\n", options, "Available User Interfaces: swt (default), web, console\r\nThe default interface is not started if you give either the '-e' or '-c' option (But you can start it by hand with '-u').", true);
        System.exit(0);
      }
    }
    return commands;
  }
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

     * configuration.
     */
    public static void displayHelp()
    {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp(Schema2XMI.class.getName() + " [options] ...]]", "\nOptions:", options, "\n");
    }

    /**
     * Parse a string-array of command-line arguments.
     * <p>
 
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  private static void printUsage(Options options) {
    System.out.println("Sesame Server, a standalone RDF server.");
    HelpFormatter formatter = new HelpFormatter();
    formatter.setWidth(80);
    formatter.printHelp("server [OPTION]", options);
  }
}
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  private static void printUsage(Options options) {
    System.out.println("USAGE:");
    HelpFormatter formatter = new HelpFormatter();
    formatter.setWidth(80);
    formatter.printHelp("start-server [OPTION]", options);
  }

  private static void printVersion() {
    System.out.println(SesameApplication.getServerName());
    System.out.println();
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  private static void printUsage(Options options) {
    System.out.println("Sesame Console, an interactive shell based utility to communicate with Sesame repositories.");
    HelpFormatter formatter = new HelpFormatter();
    formatter.setWidth(80);
    formatter.printHelp("start-console [OPTION] [repositoryID]", options);
    // writeln("Usage: start-console [OPTION] [repositoryID]");
    // writeln();
    // writeln(" -h, --help print this help");
    // writeln(" -s, --serverURL=URL URL of Sesame server to connect to, e.g.
    // http://localhost/openrdf-sesame/");
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

  }
 
  void printHelp()
  {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("squirrel-sql", _options);
  }

  /**
   * Create the <TT>Options</TT> object used to parse the command line.
   */
 
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

    private static void printHelp(PrintStream out, Options options) {
        HelpFormatter formatter = new HelpFormatter();
        PrintWriter pw = new PrintWriter(out);

        formatter.printHelp(
            pw,
            80,
            "groovy [options] [args]",
            "options:",
            options,
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

      CommandLine line=null;
      try{
        line = parser.parse(options, args);
      } catch(Exception e){
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp("cronconverter", options, true);
        System.exit(0);
      }
     
      sourceFile = getWholeArgument(line.getOptionValues("crontab"));
      if (sourceFile.equalsIgnoreCase("/etc/crontab")) sysTab = true;
View Full Code Here

Examples of org.apache.commons.cli.HelpFormatter.printHelp()

*/
public class Main implements Constants {

  private static void printUsageAndExit(Options options, int exitCode) {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("bin/hbase rest start", "", options,
      "\nTo run the REST server as a daemon, execute " +
      "bin/hbase-daemon.sh start|stop rest [--infoport <port>] [-p <port>] [-ro]\n", true);
    System.exit(exitCode);
  }

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.