1pack200(1)                   Java Deployment Tools                  pack200(1)
2
3
4

NAME

6       pack200 - Packages a JAR file into a compressed pack200 file for web
7       deployment.
8

SYNOPSIS

10       pack200 [options] output-file JAR-file
11
12       Options can be in any order. The last option on the command line or in
13       a properties file supersedes all previously specified options.
14
15       options
16              The command-line options. See Options.
17
18       output-file
19              Name of the output file.
20
21       JAR-file
22              Name of the input file.
23

DESCRIPTION

25       The pack200 command is a Java application that transforms a JAR file
26       into a compressed pack200 file with the Java gzip compressor. The
27       pack200 files are highly compressed files that can be directly deployed
28       to save bandwidth and reduce download time.
29
30       The pack200 command has several options to fine-tune and set the
31       compression engine. The typical usage is shown in the following
32       example, where myarchive.pack.gz is produced with the default pack200
33       command settings:
34
35       pack200 myarchive.pack.gz myarchive.jar
36
37

OPTIONS

39       -r, --repack
40              Produces a JAR file by packing and unpacking a JAR file. The
41              resulting file can be used as an input to the jarsigner(1) tool.
42              The following example packs and unpacks the myarchive.jar file:
43
44              pack200 --repack myarchive-packer.jar myarchive.jar
45              pack200 --repack myarchive.jar
46
47
48
49              The following example preserves the order of files in the input
50              file.
51
52       -g, --no-gzip
53              Produces a pack200 file. With this option, a suitable compressor
54              must be used, and the target system must use a corresponding
55              decompresser.
56
57              pack200 --no-gzip myarchive.pack myarchive.jar
58
59
60
61       -G, --strip-debug
62              Strips debugging attributes from the output. These include
63              SourceFile, LineNumberTable, LocalVariableTable and
64              LocalVariableTypeTable. Removing these attributes reduces the
65              size of both downloads and installations, but reduces the
66              usefulness of debuggers.
67
68       --keep-file-order
69              Preserve the order of files in the input file. This is the
70              default behavior.
71
72       -O, --no-keep-file-order
73              The packer reorders and transmits all elements. The packer can
74              also remove JAR directory names to reduce the download size.
75              However, certain JAR file optimizations, such as indexing, might
76              not work correctly.
77
78       -Svalue , --segment-limit=value
79              The value is the estimated target size N (in bytes) of each
80              archive segment. If a single input file requires more than N
81              bytes, then its own archive segment is provided. As a special
82              case, a value of -1 produces a single large segment with all
83              input files, while a value of 0 produces one segment for each
84              class. Larger archive segments result in less fragmentation and
85              better compression, but processing them requires more memory.
86
87              The size of each segment is estimated by counting the size of
88              each input file to be transmitted in the segment with the size
89              of its name and other transmitted properties.
90
91              The default is -1, which means that the packer creates a single
92              segment output file. In cases where extremely large output files
93              are generated, users are strongly encouraged to use segmenting
94              or break up the input file into smaller JARs.
95
96              A 10 MB JAR packed without this limit typically packs about 10
97              percent smaller, but the packer might require a larger Java heap
98              (about 10 times the segment limit).
99
100       -Evalue , --effort=value
101              If the value is set to a single decimal digit, then the packer
102              uses the indicated amount of effort in compressing the archive.
103              Level 1 might produce somewhat larger size and faster
104              compression speed, while level 9 takes much longer, but can
105              produce better compression. The special value 0 instructs the
106              pack200 command to copy through the original JAR file directly
107              with no compression. The JSR 200 standard requires any unpacker
108              to understand this special case as a pass-through of the entire
109              archive.
110
111              The default is 5, to invest a modest amount of time to produce
112              reasonable compression.
113
114       -Hvalue , --deflate-hint=value
115              Overrides the default, which preserves the input information,
116              but can cause the transmitted archive to be larger. The possible
117              values are: true, false, or keep.
118
119              If the value is true or false, then the packer200 command sets
120              the deflation hint accordingly in the output archive and does
121              not transmit the individual deflation hints of archive elements.
122
123              The keep value preserves deflation hints observed in the input
124              JAR. This is the default.
125
126       -mvalue , --modification-time=value
127              The possible values are latest and keep.
128
129              If the value is latest, then the packer attempts to determine
130              the latest modification time, among all the available entries in
131              the original archive, or the latest modification time of all the
132              available entries in that segment. This single value is
133              transmitted as part of the segment and applied to all the
134              entries in each segment. This can marginally decrease the
135              transmitted size of the archive at the expense of setting all
136              installed files to a single date.
137
138              If the value is keep, then modification times observed in the
139              input JAR are preserved. This is the default.
140
141       -Pfile , --pass-file=file
142              Indicates that a file should be passed through bytewise with no
143              compression. By repeating the option, multiple files can be
144              specified. There is no pathname transformation, except that the
145              system file separator is replaced by the JAR file separator
146              forward slash (/). The resulting file names must match exactly
147              as strings with their occurrences in the JAR file. If file is a
148              directory name, then all files under that directory are passed.
149
150       -Uaction , --unknown-attribute=action
151              Overrides the default behavior, which means that the class file
152              that contains the unknown attribute is passed through with the
153              specified action. The possible values for actions are error,
154              strip, or pass.
155
156              If the value is error, then the entire pack200 command operation
157              fails with a suitable explanation.
158
159              If the value is strip, then the attribute is dropped. Removing
160              the required Java Virtual Machine (JVM) attributes can cause
161              class loader failures.
162
163              If the value is pass, then the entire class is transmitted as
164              though it is a resource.
165
166       -Cattribute-name=layout , --class-attribute=attribute-name=action
167              See next option.
168
169       -Fattribute-name=layout , --field-attribute=attribute-name=action
170              See next option.
171
172       -Mattribute-name=layout , --method-attribute=attribute-name=action
173              See next option.
174
175       -Dattribute-name=layout , --code-attribute=attribute-name=action
176              With the previous four options, the attribute layout can be
177              specified for a class entity, such as class-attribute, field-
178              attribute, method-attribute, and code-attribute. The attribute-
179              name is the name of the attribute for which the layout or action
180              is being defined. The possible values for action are some-
181              layout-string, error, strip, pass.
182
183              some-layout-string: The layout language is defined in the JSR
184              200 specification, for example: --class-
185              attribute=SourceFile=RUH.
186
187              If the value is error, then the pack200 operation fails with an
188              explanation.
189
190              If the value is strip, then the attribute is removed from the
191              output. Removing JVM-required attributes can cause class loader
192              failures. For example, --class-attribute=CompilationID=pass
193              causes the class file that contains this attribute to be passed
194              through without further action by the packer.
195
196              If the value is pass, then the entire class is transmitted as
197              though it is a resource.
198
199       -f pack.properties , --config-file=pack.properties
200              A configuration file, containing Java properties to initialize
201              the packer, can be specified on the command line.
202
203              pack200 -f pack.properties myarchive.pack.gz myarchive.jar
204              more pack.properties
205              # Generic properties for the packer.
206              modification.time=latest
207              deflate.hint=false
208              keep.file.order=false
209              # This option will cause the files bearing new attributes to
210              # be reported as an error rather than passed uncompressed.
211              unknown.attribute=error
212              # Change the segment limit to be unlimited.
213              segment.limit=-1
214
215
216
217       -v, --verbose
218              Outputs minimal messages. Multiple specification of this option
219              will create more verbose messages.
220
221       -q, --quiet
222              Specifies quiet operation with no messages.
223
224       -lfilename , --log-file=filename
225              Specifies a log file to output messages.
226
227       -?, -h, --help
228              Prints help information about this command.
229
230       -V, --version
231              Prints version information about this command.
232
233       -Joption
234              Passes the specified option to the Java Virtual Machine. For
235              more information, see the reference page for the java(1)
236              command. For example, -J-Xms48m sets the startup memory to 48
237              MB.
238

EXIT STATUS

240       The following exit values are returned: 0 for successful completion and
241       a number greater than 0 when an error occurs.
242

NOTES

244       This command should not be confused with pack(1). The pack and pack200
245       commands are separate products.
246
247       The Java SE API Specification provided with the JDK is the superseding
248       authority, when there are discrepancies.
249

SEE ALSO

251       · unpack200(1)
252
253       · jar(1)
254
255       · jarsigner(1)
256
257
258
259JDK 8                          21 November 2013                     pack200(1)
Impressum