annotate src/solaris/doc/sun/man/man1/pack200.1 @ 4992:7f2d38ddd4e8

Merge
author mfang
date Wed, 16 May 2012 12:06:37 -0700
parents 42c22d5a2cd0
children
rev   line source
bpatel@4176 1 ." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
duke@0 2 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 3 ."
duke@0 4 ." This code is free software; you can redistribute it and/or modify it
duke@0 5 ." under the terms of the GNU General Public License version 2 only, as
duke@0 6 ." published by the Free Software Foundation.
duke@0 7 ."
duke@0 8 ." This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 9 ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 10 ." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 11 ." version 2 for more details (a copy is included in the LICENSE file that
duke@0 12 ." accompanied this code).
duke@0 13 ."
duke@0 14 ." You should have received a copy of the GNU General Public License version
duke@0 15 ." 2 along with this work; if not, write to the Free Software Foundation,
duke@0 16 ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 17 ."
ohair@2362 18 ." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@2362 19 ." or visit www.oracle.com if you need additional information or have any
ohair@2362 20 ." questions.
tbell@1178 21 ."
bpatel@4900 22 .TH pack200 1 "16 Mar 2012"
duke@0 23
duke@0 24 .LP
tbell@1178 25 .SH "Name"
duke@0 26 pack200 \- JAR Packing tool
duke@0 27 .LP
duke@0 28 .SH "SYNOPSIS"
duke@0 29 .LP
duke@0 30 .LP
duke@0 31 \f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP
duke@0 32 .LP
duke@0 33 .LP
duke@0 34 Options may be in any order. The last option on the command line or in a properties file supersedes all previously specified options.
duke@0 35 .LP
duke@0 36 .RS 3
duke@0 37 .TP 3
duke@0 38 options
duke@0 39 Command\-line options.
duke@0 40 .TP 3
duke@0 41 output\-file
duke@0 42 Name of the output file.
duke@0 43 .TP 3
duke@0 44 JAR\-file
duke@0 45 Name of the input file.
tbell@1178 46 .RE
tbell@1178 47
duke@0 48 .LP
duke@0 49 .SH "DESCRIPTION"
duke@0 50 .LP
duke@0 51 .LP
duke@0 52 The \f2pack200\fP tool is a Java application that transforms a JAR file into a compressed \f2pack200\fP file using the Java \f2gzip\fP compressor. The \f2pack200\fP files are highly compressed files that can be directly deployed, saving bandwidth and reducing download time.
duke@0 53 .LP
duke@0 54 .LP
duke@0 55 The \f2pack200\fP tool uses several options to fine\-tune and set the compression engine.
duke@0 56 .LP
duke@0 57 .SS
duke@0 58 Typical usage:
duke@0 59 .LP
duke@0 60 .LP
duke@0 61 \f2% pack200 myarchive.pack.gz myarchive.jar\fP
duke@0 62 .LP
duke@0 63 .LP
duke@0 64 In this example, \f2myarchive.pack.gz\fP is produced using the default \f2pack200\fP settings.
duke@0 65 .LP
duke@0 66 .SH "OPTIONS"
duke@0 67 .LP
duke@0 68 .LP
duke@0 69 \f4\-r \-\-repack\fP
duke@0 70 .LP
duke@0 71 .LP
duke@0 72 Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. The resulting file can be used as an input to the \f2jarsigner(1)\fP tool.
duke@0 73 .LP
duke@0 74 .LP
duke@0 75 \f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP
duke@0 76 .LP
duke@0 77 .LP
duke@0 78 \f2% pack200 \-\-repack myarchive.jar\fP
duke@0 79 .LP
duke@0 80 .LP
duke@0 81 \f4\-g \-\-no\-gzip\fP
duke@0 82 .LP
duke@0 83 .LP
duke@0 84 Produces a \f2pack200\fP file. With this option a suitable compressor must be used, and the target system must use a corresponding decompresser.
duke@0 85 .LP
duke@0 86 .LP
duke@0 87 \f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP
duke@0 88 .LP
duke@0 89 .LP
duke@0 90 \f4\-G \-\-strip\-debug\fP
duke@0 91 .LP
duke@0 92 .LP
duke@0 93 Strips attributes used for debugging from the output. These include \f2SourceFile\fP, \f2LineNumberTable\fP, \f2LocalVariableTable\fP and \f2LocalVariableTypeTable\fP. Removing these attributes reduces the size of both downloads and installations but reduces the usefulness of debuggers.
duke@0 94 .LP
bpatel@4176 95 .LP
bpatel@4176 96 \f4\-\-keep\-file\-order\fP
bpatel@4176 97 .LP
bpatel@4176 98 .LP
bpatel@4176 99 Preserve the order of files in the input file; this is the default behavior.
bpatel@4176 100 .LP
duke@0 101 .LP
duke@0 102 \f4\-O \-\-no\-keep\-file\-order\fP
duke@0 103 .LP
duke@0 104 .LP
duke@0 105 The packer will reorder and transmit all elements. Additionally, the packer may remove JAR directory names. This will reduce the download size; however, certain JAR file optimizations, such as indexing, may not work correctly.
duke@0 106 .LP
duke@0 107 .LP
duke@0 108 \f4\-Svalue \-\-segment\-limit=\fP\f2value\fP
duke@0 109 .LP
duke@0 110 .LP
duke@0 111 The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires
duke@0 112 .br
duke@0 113 more than N bytes, it will be given its own archive segment. As a special case, a value of \f2\-1\fP will produce a single large segment with all input files, while a value of \f20\fP will produce one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.
duke@0 114 .LP
duke@0 115 .LP
duke@0 116 The size of each segment is estimated by counting the size of each input file to be transmitted in the segment, along with the size of its name and other transmitted properties.
duke@0 117 .LP
duke@0 118 .LP
bpatel@4176 119 The default is \-1, which means the packer will always create a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs.
duke@0 120 .LP
duke@0 121 .LP
duke@0 122 A 10MB JAR packed without this limit will typically pack about 10% smaller, but the packer may require a larger Java heap (about ten times the segment limit).
duke@0 123 .LP
duke@0 124 .LP
duke@0 125 \f4\-Evalue \-\-effort=\fP\f2value\fP
duke@0 126 .LP
duke@0 127 .LP
duke@0 128 If the value is set to a single decimal digit, the packer will use the indicated amount of effort in compressing the archive. Level \f21\fP may produce somewhat larger size and faster compression speed, while level \f29\fP will take much longer but may produce better compression. The special value \f20\fP instructs the packer to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass\-through of the entire archive.
duke@0 129 .LP
duke@0 130 .LP
duke@0 131 The default is \f25\fP, investing a modest amount of time to produce reasonable compression.
duke@0 132 .LP
duke@0 133 .LP
duke@0 134 \f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
duke@0 135 .LP
duke@0 136 .LP
duke@0 137 Overrides the default, which preserves the input information, but may cause the transmitted archive to be larger. The possible values are:
duke@0 138 .LP
tbell@1178 139 .RS 3
duke@0 140 .TP 3
duke@0 141 true
duke@0 142 .TP 3
duke@0 143 false
duke@0 144 In either case, the packer will set the deflation hint accordingly in the output archive, and will not transmit the individual deflation hints of archive elements.
tbell@1178 145 .RE
tbell@1178 146
duke@0 147 .LP
tbell@1178 148 .RS 3
duke@0 149 .TP 3
duke@0 150 keep
duke@0 151 Preserve deflation hints observed in the input JAR. (This is the default.)
tbell@1178 152 .RE
tbell@1178 153
duke@0 154 .LP
duke@0 155 .LP
duke@0 156 \f4\-mvalue \-\-modification\-time=\fP\f2value\fP
duke@0 157 .LP
duke@0 158 .LP
duke@0 159 The possible values are:
duke@0 160 .LP
tbell@1178 161 .RS 3
duke@0 162 .TP 3
duke@0 163 latest
duke@0 164 The packer will attempt to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment. This single value will be transmitted as part of the segment and applied to all the entries in each segment. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date.
duke@0 165 .TP 3
duke@0 166 keep
duke@0 167 Preserves modification times observed in the input JAR. (This is the default.)
tbell@1178 168 .RE
tbell@1178 169
duke@0 170 .LP
duke@0 171 .LP
duke@0 172 \f4\-Pfile \-\-pass\-file=\fP\f2file\fP
duke@0 173 .LP
duke@0 174 .LP
duke@0 175 Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files may be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator "\f2/\fP". The resulting file names must match exactly as strings with their occurrences in the JAR file. If file is a directory name, all files under that directory will be passed.
duke@0 176 .LP
duke@0 177 .LP
duke@0 178 \f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP
duke@0 179 .LP
duke@0 180 .LP
duke@0 181 Overrides the default behavior; i.e., the classfile containing the unknown attribute will be passed through with the specified action. The possible values for actions are:
duke@0 182 .LP
tbell@1178 183 .RS 3
duke@0 184 .TP 3
duke@0 185 error
duke@0 186 The \f2pack200\fP operation as a whole will fail with a suitable explanation.
duke@0 187 .TP 3
duke@0 188 strip
duke@0 189 The attribute will be dropped. Note: Removing the required VM attributes may cause Class Loader failures.
duke@0 190 .TP 3
duke@0 191 pass
duke@0 192 Upon encountering this attribute, the entire class will be transmitted as though it is a resource.
tbell@1178 193 .RE
tbell@1178 194
duke@0 195 .LP
duke@0 196 .LP
duke@0 197 \f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP
duke@0 198 .br
tbell@1178 199 \f4\-Fattribute\-name=\fP\f2layout\fP \f3\-\-field\-attribute=\fP\f2attribute\-name=action\fP
duke@0 200 .br
tbell@1178 201 \f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP
duke@0 202 .br
tbell@1178 203 \f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP
duke@0 204 .LP
duke@0 205 .LP
duke@0 206 With the above four options, the attribute layout can be specified for a class entity, such as Class attribute, Field attribute, Method attribute, and Code attribute. The attribute\-name is the name of the attribute for which the layout or action is being defined. The possible values for action are:
duke@0 207 .LP
tbell@1178 208 .RS 3
duke@0 209 .TP 3
duke@0 210 some\-layout\-string
duke@0 211 The layout language is defined in the JSR 200 specification.
duke@0 212 .LP
duke@0 213 Example: \f2\-\-class\-attribute=SourceFile=RUH\fP
duke@0 214 .TP 3
duke@0 215 error
duke@0 216 Upon encountering this attribute, the pack200 operation will fail with a suitable explanation.
duke@0 217 .TP 3
duke@0 218 strip
duke@0 219 Upon encountering this attribute, the attribute will be removed from the output. Note: removing VM\-required attributes may cause Class Loader failures.
tbell@1178 220 .RE
tbell@1178 221
duke@0 222 .LP
duke@0 223 .LP
duke@0 224 Example: \f2\-\-class\-attribute=CompilationID=pass\fP will cause the class file containing this attribute to be passed through without further action by the packer.
duke@0 225 .LP
duke@0 226 .LP
duke@0 227 \f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP
duke@0 228 .LP
duke@0 229 .LP
duke@0 230 A configuration file, containing Java properties to initialize the packer, may be specified on the command line.
duke@0 231 .LP
duke@0 232 .LP
duke@0 233 \f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP
duke@0 234 .br
duke@0 235 \f2% more pack.properties\fP
duke@0 236 .br
duke@0 237 \f2# Generic properties for the packer.\fP
duke@0 238 .br
duke@0 239 \f2modification.time=latest\fP
duke@0 240 .br
duke@0 241 \f2deflate.hint=false\fP
duke@0 242 .br
duke@0 243 \f2keep.file.order=false\fP
duke@0 244 .br
duke@0 245 \f2# This option will cause the files bearing new attributes to\fP
duke@0 246 .br
duke@0 247 \f2# be reported as an error rather than passed uncompressed.\fP
duke@0 248 .br
duke@0 249 \f2unknown.attribute=error\fP
duke@0 250 .br
duke@0 251 \f2# Change the segment limit to be unlimited.\fP
duke@0 252 .br
duke@0 253 \f2segment.limit=\-1\fP
duke@0 254 .LP
duke@0 255 .LP
duke@0 256 \f4\-v \-\-verbose\fP
duke@0 257 .LP
duke@0 258 .LP
duke@0 259 Outputs minimal messages. Multiple specification of this option will output more verbose messages.
duke@0 260 .LP
duke@0 261 .LP
duke@0 262 \f4\-q \-\-quiet\fP
duke@0 263 .LP
duke@0 264 .LP
duke@0 265 Specifies quiet operation with no messages.
duke@0 266 .LP
duke@0 267 .LP
duke@0 268 \f4\-lfilename \-\-log\-file=\fP\f2filename\fP
duke@0 269 .LP
duke@0 270 .LP
duke@0 271 Specifies a log file to output messages.
duke@0 272 .LP
duke@0 273 .LP
bpatel@4176 274 \f4\-? \-h \-\-help\fP
duke@0 275 .LP
duke@0 276 .LP
bpatel@4176 277 Prints help information about this command.
duke@0 278 .LP
duke@0 279 .LP
bpatel@4176 280 \f4\-V \-\-version\fP
bpatel@4176 281 .LP
bpatel@4176 282 .LP
bpatel@4176 283 Prints version information about this command.
bpatel@4176 284 .LP
bpatel@4176 285 .LP
bpatel@4176 286 \f4\-J\fP\f2option\fP
bpatel@4176 287 .LP
bpatel@4176 288 .LP
bpatel@4176 289 Passes \f2option\fP to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java.
bpatel@4176 290 .LP
duke@0 291 .SH "EXIT STATUS"
duke@0 292 .LP
duke@0 293 .LP
duke@0 294 The following exit values are returned:
duke@0 295 .LP
duke@0 296 .LP
duke@0 297 \f2\ 0\fP for successful completion;
duke@0 298 .LP
duke@0 299 .LP
duke@0 300 \f2>0\fP if an error occurs.
duke@0 301 .LP
duke@0 302 .SH "SEE ALSO"
duke@0 303 .LP
duke@0 304 .RS 3
duke@0 305 .TP 2
tbell@1178 306 o
tbell@1178 307 unpack200(1)
duke@0 308 .TP 2
tbell@1178 309 o
tbell@1178 310 .na
tbell@1178 311 \f2Java SE Documentation\fP @
tbell@1178 312 .fi
bpatel@4900 313 http://docs.oracle.com/javase/7/docs/index.html
duke@0 314 .TP 2
tbell@1178 315 o
duke@0 316 .na
duke@0 317 \f2Java Deployment Guide \- Pack200\fP @
duke@0 318 .fi
bpatel@4900 319 http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
duke@0 320 .TP 2
tbell@1178 321 o
tbell@1178 322 jar(1) \- Java Archive Tool
duke@0 323 .TP 2
tbell@1178 324 o
tbell@1178 325 jarsigner(1) \- JAR Signer tool
tbell@1178 326 .TP 2
tbell@1178 327 o
tbell@1178 328 \f2attributes(5)\fP man page
duke@0 329 .RE
duke@0 330
duke@0 331 .LP
duke@0 332 .SH "NOTES"
duke@0 333 .LP
duke@0 334 .LP
duke@0 335 This command should not be confused with \f2pack(1)\fP. They are distinctly separate products.
duke@0 336 .LP
duke@0 337 .LP
tbell@1178 338 The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
tbell@1178 339 .LP
duke@0 340