< prev index next >

src/java.base/share/classes/com/sun/java/util/jar/pack/DriverResource.java

Print this page
rev 47855 : 8189102: All tools should support -?, -h and --help
   1 /*
   2  * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  72                 "                                  and LocalVariableTypeTable) while packing",
  73                 "  -O, --no-keep-file-order        do not transmit file ordering information",
  74                 "  --keep-file-order               (default) preserve input file ordering",
  75                 "  -S{N}, --segment-limit={N}      limit segment sizes (default unlimited)",
  76                 "  -E{N}, --effort={N}             packing effort (default N=5)",
  77                 "  -H{h}, --deflate-hint={h}       transmit deflate hint: true, false,",
  78                 "                                  or keep (default)",
  79                 "  -m{V}, --modification-time={V}  transmit modtimes: latest or keep (default)",
  80                 "  -P{F}, --pass-file={F}          transmit the given input element(s) unchanged",
  81                 "  -U{a}, --unknown-attribute={a}  unknown attribute action: error, strip,",
  82                 "                                  or pass (default)",
  83                 "  -C{N}={L}, --class-attribute={N}={L}  (user-defined attribute)",
  84                 "  -F{N}={L}, --field-attribute={N}={L}  (user-defined attribute)",
  85                 "  -M{N}={L}, --method-attribute={N}={L} (user-defined attribute)",
  86                 "  -D{N}={L}, --code-attribute={N}={L}   (user-defined attribute)",
  87                 "  -f{F}, --config-file={F}        read file F for Pack200.Packer properties",
  88                 "  -v, --verbose                   increase program verbosity",
  89                 "  -q, --quiet                     set verbosity to lowest level",
  90                 "  -l{F}, --log-file={F}           output to the given log file, ",
  91                 "                                  or '-' for System.out",
  92                 "  -?, -h, --help                  print this message",
  93                 "  -V, --version                   print program version",
  94                 "  -J{X}                           pass option X to underlying Java VM",
  95                 "",
  96                 "Notes:",
  97                 "  The -P, -C, -F, -M, and -D options accumulate.",
  98                 "  Example attribute definition:  -C SourceFile=RUH .",
  99                 "  Config. file properties are defined by the Pack200 API.",
 100                 "  For meaning of -S, -E, -H-, -m, -U values, see Pack200 API.",
 101                 "  Layout definitions (like RUH) are defined by JSR 200.",
 102                 "",
 103                 "Repacking mode updates the JAR file with a pack/unpack cycle:",
 104                 "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n",
 105                 "",
 106                 "Exit Status:",
 107                 "  0 if successful, >0 if an error occurred"
 108             }
 109         },
 110         {UNPACK_HELP, new String[] {
 111                 "Usage:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
 112                 "",
 113                 "Unpacking Options",
 114                 "  -H{h}, --deflate-hint={h}     override transmitted deflate hint:",
 115                 "                                true, false, or keep (default)",
 116                 "  -r, --remove-pack-file        remove input file after unpacking",
 117                 "  -v, --verbose                 increase program verbosity",
 118                 "  -q, --quiet                   set verbosity to lowest level",
 119                 "  -l{F}, --log-file={F}         output to the given log file, or",
 120                 "                                '-' for System.out",
 121                 "  -?, -h, --help                print this message",
 122                 "  -V, --version                 print program version",
 123                 "  -J{X}                         pass option X to underlying Java VM"
 124             }
 125         },
 126         {MORE_INFO, "(For more information, run {0} --help .)"}, // parameter 0:command name
 127         {DUPLICATE_OPTION, "duplicate option: {0}"}, // parameter 0:option
 128         {BAD_SPEC, "bad spec for {0}: {1}"}, // parameter 0:option;parameter 1:specifier
 129     };
 130 
 131     protected Object[][] getContents() {
 132         return resource;
 133     }
 134 }
   1 /*
   2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  72                 "                                  and LocalVariableTypeTable) while packing",
  73                 "  -O, --no-keep-file-order        do not transmit file ordering information",
  74                 "  --keep-file-order               (default) preserve input file ordering",
  75                 "  -S{N}, --segment-limit={N}      limit segment sizes (default unlimited)",
  76                 "  -E{N}, --effort={N}             packing effort (default N=5)",
  77                 "  -H{h}, --deflate-hint={h}       transmit deflate hint: true, false,",
  78                 "                                  or keep (default)",
  79                 "  -m{V}, --modification-time={V}  transmit modtimes: latest or keep (default)",
  80                 "  -P{F}, --pass-file={F}          transmit the given input element(s) unchanged",
  81                 "  -U{a}, --unknown-attribute={a}  unknown attribute action: error, strip,",
  82                 "                                  or pass (default)",
  83                 "  -C{N}={L}, --class-attribute={N}={L}  (user-defined attribute)",
  84                 "  -F{N}={L}, --field-attribute={N}={L}  (user-defined attribute)",
  85                 "  -M{N}={L}, --method-attribute={N}={L} (user-defined attribute)",
  86                 "  -D{N}={L}, --code-attribute={N}={L}   (user-defined attribute)",
  87                 "  -f{F}, --config-file={F}        read file F for Pack200.Packer properties",
  88                 "  -v, --verbose                   increase program verbosity",
  89                 "  -q, --quiet                     set verbosity to lowest level",
  90                 "  -l{F}, --log-file={F}           output to the given log file, ",
  91                 "                                  or '-' for System.out",
  92                 "  -?, -h, --help                  print this help message",
  93                 "  -V, --version                   print program version",
  94                 "  -J{X}                           pass option X to underlying Java VM",
  95                 "",
  96                 "Notes:",
  97                 "  The -P, -C, -F, -M, and -D options accumulate.",
  98                 "  Example attribute definition:  -C SourceFile=RUH .",
  99                 "  Config. file properties are defined by the Pack200 API.",
 100                 "  For meaning of -S, -E, -H-, -m, -U values, see Pack200 API.",
 101                 "  Layout definitions (like RUH) are defined by JSR 200.",
 102                 "",
 103                 "Repacking mode updates the JAR file with a pack/unpack cycle:",
 104                 "    pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n",
 105                 "",
 106                 "Exit Status:",
 107                 "  0 if successful, >0 if an error occurred"
 108             }
 109         },
 110         {UNPACK_HELP, new String[] {
 111                 "Usage:  unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
 112                 "",
 113                 "Unpacking Options",
 114                 "  -H{h}, --deflate-hint={h}     override transmitted deflate hint:",
 115                 "                                true, false, or keep (default)",
 116                 "  -r, --remove-pack-file        remove input file after unpacking",
 117                 "  -v, --verbose                 increase program verbosity",
 118                 "  -q, --quiet                   set verbosity to lowest level",
 119                 "  -l{F}, --log-file={F}         output to the given log file, or",
 120                 "                                '-' for System.out",
 121                 "  -?, -h, --help                print this help message",
 122                 "  -V, --version                 print program version",
 123                 "  -J{X}                         pass option X to underlying Java VM"
 124             }
 125         },
 126         {MORE_INFO, "(For more information, run {0} --help .)"}, // parameter 0:command name
 127         {DUPLICATE_OPTION, "duplicate option: {0}"}, // parameter 0:option
 128         {BAD_SPEC, "bad spec for {0}: {1}"}, // parameter 0:option;parameter 1:specifier
 129     };
 130 
 131     protected Object[][] getContents() {
 132         return resource;
 133     }
 134 }
< prev index next >