< prev index next >

src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Ktab.java

Print this page
rev 47855 : 8189102: All tools should support -?, -h and --help

*** 70,81 **** * The main program that can be invoked at command line. * See {@link #printHelp} for usages. */ public static void main(String[] args) { Ktab ktab = new Ktab(); ! if ((args.length == 1) && (args[0].equalsIgnoreCase("-help"))) { ktab.printHelp(); return; } else if ((args == null) || (args.length == 0)) { ktab.action = 'l'; } else { ktab.processArgs(args); --- 70,87 ---- * The main program that can be invoked at command line. * See {@link #printHelp} for usages. */ public static void main(String[] args) { Ktab ktab = new Ktab(); ! if ((args.length == 1) && ! ((args[0].equalsIgnoreCase("-?")) || ! (args[0].equalsIgnoreCase("-h")) || ! (args[0].equalsIgnoreCase("--help")) || ! // -help: legacy. Undocumented. ! (args[0].equalsIgnoreCase("-help")))) { ktab.printHelp(); + System.exit(0); return; } else if ((args == null) || (args.length == 0)) { ktab.action = 'l'; } else { ktab.processArgs(args);
*** 445,453 **** --- 451,460 ---- + " defined in RFC 3961, section 8. A prompt to confirm the deletion is\n" + " displayed unless -f is specified."); System.out.println(); System.out.println("Common option(s):"); System.out.println(); + System.out.println("-?, -h, --help print this help message and exit."); System.out.println("-k <keytab name>\n" + " specify keytab name and path with prefix FILE:"); } }
< prev index next >