Exemplo n.º 1
0
  /**
   * Prints the commandline help and exists with the given code.
   *
   * @param exitCode the exit code
   */
  protected void printHelpAndExit(int exitCode) throws JSAPException {
    JSAP jsap = getOptions();

    System.out.println();
    System.out.println("Usage: " + WakeOnLan.class.getName());
    System.out.println(jsap.getUsage());
    System.out.println();
    System.out.println(jsap.getHelp());
    System.exit(exitCode);
  }
Exemplo n.º 2
0
 /** Print the WakeOnLan version and exit. */
 protected void printVersionAndExit() {
   System.out.println(VERSIONSTRING);
   System.exit(0);
 }