author | rehn |
Fri, 07 Jul 2017 23:04:06 +0200 | |
changeset 46643 | cb5f289ba033 |
parent 31876 | 91b22707521a |
permissions | -rw-r--r-- |
21743 | 1 |
'\" t |
31876
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
2 |
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
3 |
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
4 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
5 |
.\" This code is free software; you can redistribute it and/or modify it |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
6 |
.\" under the terms of the GNU General Public License version 2 only, as |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
7 |
.\" published by the Free Software Foundation. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
8 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
9 |
.\" This code is distributed in the hope that it will be useful, but WITHOUT |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
10 |
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
11 |
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
12 |
.\" version 2 for more details (a copy is included in the LICENSE file that |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
13 |
.\" accompanied this code). |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
14 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
15 |
.\" You should have received a copy of the GNU General Public License version |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
16 |
.\" 2 along with this work; if not, write to the Free Software Foundation, |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
17 |
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
18 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
19 |
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
20 |
.\" or visit www.oracle.com if you need additional information or have any |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
21 |
.\" questions. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
22 |
.\" |
21743 | 23 |
.\" Arch: generic |
24 |
.\" Software: JDK 8 |
|
25 |
.\" Date: 21 November 2013 |
|
26 |
.\" SectDesc: Java Deployment Tools |
|
27 |
.\" Title: pack200.1 |
|
28 |
.\" |
|
29 |
.if n .pl 99999 |
|
30 |
.TH pack200 1 "21 November 2013" "JDK 8" "Java Deployment Tools" |
|
31876
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
31 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
32 |
.\" * Define some portability stuff |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
33 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
34 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
35 |
.\" http://bugs.debian.org/507673 |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
36 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
37 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
38 |
.ie \n(.g .ds Aq \(aq |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
39 |
.el .ds Aq ' |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
40 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
41 |
.\" * set default formatting |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
42 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
43 |
.\" disable hyphenation |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
44 |
.nh |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
45 |
.\" disable justification (adjust text to left margin only) |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
46 |
.ad l |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
47 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
48 |
.\" * MAIN CONTENT STARTS HERE * |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
49 |
.\" ----------------------------------------------------------------- |
12047 | 50 |
|
21743 | 51 |
.SH NAME |
52 |
pack200 \- Packages a JAR file into a compressed pack200 file for web deployment\&. |
|
53 |
.SH SYNOPSIS |
|
54 |
.sp |
|
55 |
.nf |
|
12047 | 56 |
|
21743 | 57 |
\fBpack200\fR [\fIoptions\fR] \fIoutput\-file\fR \fIJAR\-file\fR |
58 |
.fi |
|
59 |
.sp |
|
60 |
Options can be in any order\&. The last option on the command line or in a properties file supersedes all previously specified options\&. |
|
61 |
.TP |
|
62 |
\fIoptions\fR |
|
63 |
The command-line options\&. See Options\&. |
|
64 |
.TP |
|
65 |
\fIoutput-file\fR |
|
66 |
Name of the output file\&. |
|
67 |
.TP |
|
68 |
\fIJAR-file\fR |
|
69 |
Name of the input file\&. |
|
70 |
.SH DESCRIPTION |
|
71 |
The \f3pack200\fR command is a Java application that transforms a JAR file into a compressed pack200 file with the Java gzip compressor\&. The pack200 files are highly compressed files that can be directly deployed to save bandwidth and reduce download time\&. |
|
72 |
.PP |
|
73 |
The \f3pack200\fR command has several options to fine-tune and set the compression engine\&. The typical usage is shown in the following example, where \f3myarchive\&.pack\&.gz\fR is produced with the default \f3pack200\fR command settings: |
|
74 |
.sp |
|
75 |
.nf |
|
76 |
\f3pack200 myarchive\&.pack\&.gz myarchive\&.jar\fP |
|
77 |
.fi |
|
78 |
.nf |
|
79 |
\f3\fP |
|
80 |
.fi |
|
81 |
.sp |
|
82 |
.SH OPTIONS |
|
83 |
.TP |
|
84 |
-r, --repack |
|
12047 | 85 |
.br |
21743 | 86 |
Produces a JAR file by packing and unpacking a JAR file\&. The resulting file can be used as an input to the \f3jarsigner\fR(1) tool\&. The following example packs and unpacks the myarchive\&.jar file: |
87 |
.sp |
|
88 |
.nf |
|
89 |
\f3pack200 \-\-repack myarchive\-packer\&.jar myarchive\&.jar\fP |
|
90 |
.fi |
|
91 |
.nf |
|
92 |
\f3pack200 \-\-repack myarchive\&.jar\fP |
|
93 |
.fi |
|
94 |
.nf |
|
95 |
\f3\fP |
|
96 |
.fi |
|
97 |
.sp |
|
98 |
||
12047 | 99 |
|
21743 | 100 |
The following example preserves the order of files in the input file\&. |
101 |
.TP |
|
102 |
-g, --no-gzip |
|
103 |
.br |
|
104 |
Produces a \f3pack200\fR file\&. With this option, a suitable compressor must be used, and the target system must use a corresponding decompresser\&. |
|
105 |
.sp |
|
106 |
.nf |
|
107 |
\f3pack200 \-\-no\-gzip myarchive\&.pack myarchive\&.jar\fP |
|
108 |
.fi |
|
109 |
.nf |
|
110 |
\f3\fP |
|
111 |
.fi |
|
112 |
.sp |
|
12047 | 113 |
|
21743 | 114 |
.TP |
115 |
-G, --strip-debug |
|
116 |
.br |
|
117 |
Strips debugging attributes from the output\&. These include \f3SourceFile\fR, \f3LineNumberTable\fR, \f3LocalVariableTable\fR and \f3LocalVariableTypeTable\fR\&. Removing these attributes reduces the size of both downloads and installations, but reduces the usefulness of debuggers\&. |
|
118 |
.TP |
|
119 |
--keep-file-order |
|
120 |
.br |
|
121 |
Preserve the order of files in the input file\&. This is the default behavior\&. |
|
122 |
.TP |
|
123 |
-O, --no-keep-file-order |
|
124 |
.br |
|
125 |
The packer reorders and transmits all elements\&. The packer can also remove JAR directory names to reduce the download size\&. However, certain JAR file optimizations, such as indexing, might not work correctly\&. |
|
126 |
.TP |
|
127 |
-S\fIvalue\fR , --segment-limit=\fIvalue\fR |
|
128 |
.br |
|
129 |
The value is the estimated target size \fIN\fR (in bytes) of each archive segment\&. If a single input file requires more than \fIN\fR bytes, then its own archive segment is provided\&. As a special case, a value of \f3-1\fR produces a single large segment with all input files, while a value of 0 produces one segment for each class\&. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory\&. |
|
130 |
||
131 |
The size of each segment is estimated by counting the size of each input file to be transmitted in the segment with the size of its name and other transmitted properties\&. |
|
132 |
||
133 |
The default is -1, which means that the packer creates 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\&. |
|
134 |
||
135 |
A 10 MB JAR packed without this limit typically packs about 10 percent smaller, but the packer might require a larger Java heap (about 10 times the segment limit)\&. |
|
136 |
.TP |
|
137 |
-E\fIvalue\fR , --effort=\fIvalue\fR |
|
138 |
.br |
|
139 |
If the value is set to a single decimal digit, then the packer uses the indicated amount of effort in compressing the archive\&. Level 1 might produce somewhat larger size and faster compression speed, while level 9 takes much longer, but can produce better compression\&. The special value 0 instructs the \f3pack200\fR command 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\&. |
|
12047 | 140 |
|
21743 | 141 |
The default is 5, to invest a modest amount of time to produce reasonable compression\&. |
142 |
.TP |
|
143 |
-H\fIvalue\fR , --deflate-hint=\fIvalue\fR |
|
144 |
.br |
|
145 |
Overrides the default, which preserves the input information, but can cause the transmitted archive to be larger\&. The possible values are: \f3true\fR, \f3false\fR, or \f3keep\fR\&. |
|
146 |
||
147 |
If the \f3value\fR is \f3true\fR or false, then the \f3packer200\fR command sets the deflation hint accordingly in the output archive and does not transmit the individual deflation hints of archive elements\&. |
|
12047 | 148 |
|
21743 | 149 |
The \f3keep\fR value preserves deflation hints observed in the input JAR\&. This is the default\&. |
150 |
.TP |
|
151 |
-m\fIvalue\fR , --modification-time=\fIvalue\fR |
|
12047 | 152 |
.br |
21743 | 153 |
The possible values are \f3latest\fR and \f3keep\fR\&. |
154 |
||
155 |
If the value is latest, then the packer attempts 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 is 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\&. |
|
156 |
||
157 |
If the value is \f3keep\fR, then modification times observed in the input JAR are preserved\&. This is the default\&. |
|
158 |
.TP |
|
159 |
-P\fIfile\fR , --pass-file=\fIfile\fR |
|
12047 | 160 |
.br |
21743 | 161 |
Indicates that a file should be passed through bytewise with no compression\&. By repeating the option, multiple files can be specified\&. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator forward slash (/)\&. The resulting file names must match exactly as strings with their occurrences in the JAR file\&. If \f3file\fR is a directory name, then all files under that directory are passed\&. |
162 |
.TP |
|
163 |
-U\fIaction\fR , --unknown-attribute=\fIaction\fR |
|
12047 | 164 |
.br |
21743 | 165 |
Overrides the default behavior, which means that the class file that contains the unknown attribute is passed through with the specified \f3action\fR\&. The possible values for actions are \f3error\fR, \f3strip\fR, or \f3pass\fR\&. |
166 |
||
167 |
If the value is \f3error\fR, then the entire \f3pack200\fR command operation fails with a suitable explanation\&. |
|
168 |
||
169 |
If the value is \f3strip\fR, then the attribute is dropped\&. Removing the required Java Virtual Machine (JVM) attributes can cause class loader failures\&. |
|
12047 | 170 |
|
21743 | 171 |
If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&. |
172 |
.TP |
|
173 |
.nf |
|
174 |
-C\fIattribute-name\fR=\fIlayout\fR , --class-attribute=\fIattribute-name\fR=\fIaction\fR |
|
12047 | 175 |
.br |
21743 | 176 |
.fi |
177 |
See next option\&. |
|
178 |
.TP |
|
179 |
.nf |
|
180 |
-F\fIattribute-name\fR=\fIlayout\fR , --field-attribute=\fIattribute-name\fR=\fIaction\fR |
|
181 |
.br |
|
182 |
.fi |
|
183 |
See next option\&. |
|
184 |
.TP |
|
185 |
.nf |
|
186 |
-M\fIattribute-name\fR=\fIlayout\fR , --method-attribute=\fIattribute-name\fR=\fIaction\fR |
|
12047 | 187 |
.br |
21743 | 188 |
.fi |
189 |
See next option\&. |
|
190 |
.TP |
|
191 |
.nf |
|
192 |
-D\fIattribute-name\fR=\fIlayout\fR , --code-attribute=\fIattribute-name\fR=\fIaction\fR |
|
12047 | 193 |
.br |
21743 | 194 |
.fi |
195 |
With the previous four options, the attribute layout can be specified for a class entity, such as \f3class-attribute\fR, \f3field-attribute\fR, \f3method-attribute\fR, and \f3code-attribute\fR\&. The \fIattribute-name\fR is the name of the attribute for which the layout or action is being defined\&. The possible values for \fIaction\fR are \f3some-layout-string\fR, \f3error\fR, \f3strip\fR, \f3pass\fR\&. |
|
196 |
||
197 |
\f3some-layout-string\fR: The layout language is defined in the JSR 200 specification, for example: \f3--class-attribute=SourceFile=RUH\fR\&. |
|
198 |
||
199 |
If the value is \f3error\fR, then the \f3pack200\fR operation fails with an explanation\&. |
|
200 |
||
201 |
If the value is \f3strip\fR, then the attribute is removed from the output\&. Removing JVM-required attributes can cause class loader failures\&. For example, \f3--class-attribute=CompilationID=pass\fR causes the class file that contains this attribute to be passed through without further action by the packer\&. |
|
202 |
||
203 |
If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&. |
|
204 |
.TP |
|
205 |
-f \fIpack\&.properties\fR , --config-file=\fIpack\&.properties\fR |
|
12047 | 206 |
.br |
21743 | 207 |
A configuration file, containing Java properties to initialize the packer, can be specified on the command line\&. |
208 |
.sp |
|
209 |
.nf |
|
210 |
\f3pack200 \-f pack\&.properties myarchive\&.pack\&.gz myarchive\&.jar\fP |
|
211 |
.fi |
|
212 |
.nf |
|
213 |
\f3more pack\&.properties\fP |
|
214 |
.fi |
|
215 |
.nf |
|
216 |
\f3# Generic properties for the packer\&.\fP |
|
217 |
.fi |
|
218 |
.nf |
|
219 |
\f3modification\&.time=latest\fP |
|
220 |
.fi |
|
221 |
.nf |
|
222 |
\f3deflate\&.hint=false\fP |
|
223 |
.fi |
|
224 |
.nf |
|
225 |
\f3keep\&.file\&.order=false\fP |
|
226 |
.fi |
|
227 |
.nf |
|
228 |
\f3# This option will cause the files bearing new attributes to\fP |
|
229 |
.fi |
|
230 |
.nf |
|
231 |
\f3# be reported as an error rather than passed uncompressed\&.\fP |
|
232 |
.fi |
|
233 |
.nf |
|
234 |
\f3unknown\&.attribute=error\fP |
|
235 |
.fi |
|
236 |
.nf |
|
237 |
\f3# Change the segment limit to be unlimited\&.\fP |
|
238 |
.fi |
|
239 |
.nf |
|
240 |
\f3segment\&.limit=\-1\fP |
|
241 |
.fi |
|
242 |
.nf |
|
243 |
\f3\fP |
|
244 |
.fi |
|
245 |
.sp |
|
246 |
||
247 |
.TP |
|
248 |
-v, --verbose |
|
249 |
.br |
|
250 |
Outputs minimal messages\&. Multiple specification of this option will create more verbose messages\&. |
|
251 |
.TP |
|
252 |
-q, --quiet |
|
253 |
.br |
|
254 |
Specifies quiet operation with no messages\&. |
|
255 |
.TP |
|
256 |
-l\fIfilename\fR , --log-file=\fIfilename\fR |
|
257 |
.br |
|
258 |
Specifies a log file to output messages\&. |
|
259 |
.TP |
|
260 |
-?, -h, --help |
|
261 |
.br |
|
262 |
Prints help information about this command\&. |
|
263 |
.TP |
|
264 |
-V, --version |
|
265 |
.br |
|
266 |
Prints version information about this command\&. |
|
267 |
.TP |
|
268 |
-J\fIoption\fR |
|
269 |
.br |
|
270 |
Passes the specified option to the Java Virtual Machine\&. For more information, see the reference page for the java(1) command\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. |
|
271 |
.SH EXIT\ STATUS |
|
272 |
The following exit values are returned: 0 for successful completion and a number greater than 0 when an error occurs\&. |
|
273 |
.SH NOTES |
|
274 |
This command should not be confused with \f3pack\fR(1)\&. The \f3pack\fR and \f3pack200\fR commands are separate products\&. |
|
275 |
.PP |
|
276 |
The Java SE API Specification provided with the JDK is the superseding authority, when there are discrepancies\&. |
|
277 |
.SH SEE\ ALSO |
|
278 |
.TP 0.2i |
|
279 |
\(bu |
|
12047 | 280 |
unpack200(1) |
21743 | 281 |
.TP 0.2i |
282 |
\(bu |
|
283 |
jar(1) |
|
284 |
.TP 0.2i |
|
285 |
\(bu |
|
286 |
jarsigner(1) |
|
31876
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
287 |
.RE |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
288 |
.br |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
289 |
'pl 8.5i |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
290 |
'bp |