changeset 14285:34d28218fa21

8082537: jimage should print usage when started with no args Reviewed-by: alanb
author jlaskey
date Mon, 25 Apr 2016 09:57:55 -0300
parents f7da6c6b818b
children 229589274e08
files src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java	Mon Apr 25 09:57:55 2016 -0300
+++ b/src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java	Mon Apr 25 09:57:55 2016 -0300
@@ -152,6 +152,11 @@
             setLog(new PrintWriter(System.out));
         }
 
+        if (args.length == 0) {
+            log.println(taskHelper.getMessage("main.usage.summary", PROGNAME));
+            return EXIT_ABNORMAL;
+        }
+
         try {
             List<String> unhandled = optionsHelper.handleOptions(this, args);
             if(!unhandled.isEmpty()) {