private static String getConfigFilePath() { StringBuffer buffer = new StringBuffer(System.getProperty("user.home")); buffer.append(File.separatorChar); buffer.append(".wakeonlan.hosts"); return buffer.toString(); }
/** * 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); }
/** Print the WakeOnLan version and exit. */ protected void printVersionAndExit() { System.out.println(VERSIONSTRING); System.exit(0); }