diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java index a7a820e5c59..7c60d79657e 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java @@ -227,12 +227,6 @@ public final class TaskHelper { addOrderedPluginOptions(plugin, optionsSeen); } } - mainOptions.add(new PluginOption(false, - (task, opt, arg) -> { - // This option is handled prior - // to have the options parsed. - }, - false, "--plugin-module-path")); mainOptions.add(new PluginOption(true, (task, opt, arg) -> { for (Plugin plugin : plugins) { if (plugin.getName().equals(arg)) { diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties index 5f88c60a6ee..7a63cc38344 100644 --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties @@ -28,7 +28,7 @@ Usage: {0} --module-path --add-modules --output\n\ \ use --help for a list of possible options main.usage=\ -Usage: {0} --module-path --add-modules --output +Usage: {0} --module-path --add-modules --output\n\ \ Possible options include: error.prefix=Error: diff --git a/jdk/test/tools/jlink/JLinkTest.java b/jdk/test/tools/jlink/JLinkTest.java index e137ce426f6..4690bb12180 100644 --- a/jdk/test/tools/jlink/JLinkTest.java +++ b/jdk/test/tools/jlink/JLinkTest.java @@ -284,6 +284,13 @@ public class JLinkTest { helper.generateDefaultJModule(moduleName, "composite2"); helper.generateDefaultImage(userOptions, moduleName).assertFailure("Error: orphan argument: bar"); } + + // basic check for --help - JDK-8173717 + { + JImageGenerator.getJLinkTask() + .option("--help") + .call().assertSuccess(); + } } private static void testCompress(Helper helper, String moduleName, String... userOptions) throws IOException {