< prev index next >

src/java.base/share/classes/sun/security/tools/keytool/Main.java

Print this page
rev 48495 : 8189102: All tools should support -?, -h and --help
Reviewed-by: kvn, jjg, weijun, alanb, rfield, ksrini

*** 1,7 **** /* ! * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 521,533 **** */ Command c = Command.getCommand(flags); if (c != null) { command = c; ! } else if (collator.compare(flags, "-help") == 0 || collator.compare(flags, "-h") == 0 || ! collator.compare(flags, "-?") == 0) { help = true; } else if (collator.compare(flags, "-conf") == 0) { i++; } else if (collator.compare(flags, "-nowarn") == 0) { nowarn = true; --- 521,535 ---- */ Command c = Command.getCommand(flags); if (c != null) { command = c; ! } else if (collator.compare(flags, "--help") == 0 || collator.compare(flags, "-h") == 0 || ! collator.compare(flags, "-?") == 0 || ! // -help: legacy. ! collator.compare(flags, "-help") == 0) { help = true; } else if (collator.compare(flags, "-conf") == 0) { i++; } else if (collator.compare(flags, "-nowarn") == 0) { nowarn = true;
*** 4608,4617 **** --- 4610,4621 ---- if (c == KEYCLONE) break; System.err.printf(" %-20s%s\n", c, rb.getString(c.description)); } System.err.println(); System.err.println(rb.getString( + "Use.keytool.help.for.all.available.commands")); + System.err.println(rb.getString( "Use.keytool.command.name.help.for.usage.of.command.name")); } } private void tinyHelp() {
< prev index next >