jdk/src/jdk.jartool/share/classes/sun/tools/jar/GNUStyleOptions.java
changeset 41484 834b7539ada3
parent 40261 86a49ba76f52
child 41489 a289f1778f14
equal deleted inserted replaced
41483:99e81f03a628 41484:834b7539ada3
    25 
    25 
    26 package sun.tools.jar;
    26 package sun.tools.jar;
    27 
    27 
    28 import java.io.File;
    28 import java.io.File;
    29 import java.io.PrintStream;
    29 import java.io.PrintStream;
       
    30 import java.io.PrintWriter;
    30 import java.lang.module.ModuleFinder;
    31 import java.lang.module.ModuleFinder;
    31 import java.lang.module.ModuleDescriptor.Version;
    32 import java.lang.module.ModuleDescriptor.Version;
    32 import java.nio.file.Path;
    33 import java.nio.file.Path;
    33 import java.nio.file.Paths;
    34 import java.nio.file.Paths;
    34 import java.util.regex.Pattern;
    35 import java.util.regex.Pattern;
   287             }
   288             }
   288         }
   289         }
   289         throw new BadArgs("error.unrecognized.option", name).showUsage(true);
   290         throw new BadArgs("error.unrecognized.option", name).showUsage(true);
   290     }
   291     }
   291 
   292 
   292     static void printHelp(PrintStream out) {
   293     static void printHelp(PrintWriter out) {
   293         out.format("%s%n", Main.getMsg("main.help.preopt"));
   294         out.format("%s%n", Main.getMsg("main.help.preopt"));
   294         for (OptionType type : OptionType.values()) {
   295         for (OptionType type : OptionType.values()) {
   295             boolean typeHeadingWritten = false;
   296             boolean typeHeadingWritten = false;
   296 
   297 
   297             for (Option o : recognizedOptions) {
   298             for (Option o : recognizedOptions) {
   310             }
   311             }
   311         }
   312         }
   312         out.format("%n%s%n%n", Main.getMsg("main.help.postopt"));
   313         out.format("%n%s%n%n", Main.getMsg("main.help.postopt"));
   313     }
   314     }
   314 
   315 
   315     static void printCompatHelp(PrintStream out) {
   316     static void printCompatHelp(PrintWriter out) {
   316         out.format("%s%n", Main.getMsg("usage.compat"));
   317         out.format("%s%n", Main.getMsg("usage.compat"));
   317     }
   318     }
   318 
   319 
   319     static void printUsageSummary(PrintStream out) {
   320     static void printUsageSummary(PrintWriter out) {
   320         out.format("%s%n", Main.getMsg("main.usage.summary"));
   321         out.format("%s%n", Main.getMsg("main.usage.summary"));
   321         out.format("%s%n", Main.getMsg("main.usage.summary.try"));
   322         out.format("%s%n", Main.getMsg("main.usage.summary.try"));
   322     }
   323     }
   323 
   324 
   324     static void printVersion(PrintStream out) {
   325     static void printVersion(PrintWriter out) {
   325         out.format("%s %s%n", "jar", System.getProperty("java.version"));
   326         out.format("%s %s%n", "jar", System.getProperty("java.version"));
   326     }
   327     }
   327 }
   328 }