Exemplo n.º 1
0
  private static String getConfigFilePath() {
    StringBuffer buffer = new StringBuffer(System.getProperty("user.home"));

    buffer.append(File.separatorChar);
    buffer.append(".wakeonlan.hosts");

    return buffer.toString();
  }
Exemplo n.º 2
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.º 3
0
 /** Print the WakeOnLan version and exit. */
 protected void printVersionAndExit() {
   System.out.println(VERSIONSTRING);
   System.exit(0);
 }