annotate src/solaris/doc/sun/man/man1/pack200.1 @ 47290:b90a1b5b8142

manual merge
author mcimadamore
date Mon, 25 Sep 2017 16:38:40 +0100
parents 91b22707521a
rev   line source
rgallard@21743 1 '\" t
mfang@31876 2 .\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
mfang@31876 4 .\"
mfang@31876 5 .\" This code is free software; you can redistribute it and/or modify it
mfang@31876 6 .\" under the terms of the GNU General Public License version 2 only, as
mfang@31876 7 .\" published by the Free Software Foundation.
mfang@31876 8 .\"
mfang@31876 9 .\" This code is distributed in the hope that it will be useful, but WITHOUT
mfang@31876 10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mfang@31876 11 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mfang@31876 12 .\" version 2 for more details (a copy is included in the LICENSE file that
mfang@31876 13 .\" accompanied this code).
mfang@31876 14 .\"
mfang@31876 15 .\" You should have received a copy of the GNU General Public License version
mfang@31876 16 .\" 2 along with this work; if not, write to the Free Software Foundation,
mfang@31876 17 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mfang@31876 18 .\"
mfang@31876 19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mfang@31876 20 .\" or visit if you need additional information or have any
mfang@31876 21 .\" questions.
mfang@31876 22 .\"
rgallard@21743 23 .\" Arch: generic
rgallard@21743 24 .\" Software: JDK 8
rgallard@21743 25 .\" Date: 21 November 2013
rgallard@21743 26 .\" SectDesc: Java Deployment Tools
rgallard@21743 27 .\" Title: pack200.1
rgallard@21743 28 .\"
rgallard@21743 29 .if n .pl 99999
rgallard@21743 30 .TH pack200 1 "21 November 2013" "JDK 8" "Java Deployment Tools"
mfang@31876 31 .\" -----------------------------------------------------------------
mfang@31876 32 .\" * Define some portability stuff
mfang@31876 33 .\" -----------------------------------------------------------------
mfang@31876 34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mfang@31876 35 .\"
mfang@31876 36 .\"
mfang@31876 37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mfang@31876 38 .ie \n(.g .ds Aq \(aq
mfang@31876 39 .el .ds Aq '
mfang@31876 40 .\" -----------------------------------------------------------------
mfang@31876 41 .\" * set default formatting
mfang@31876 42 .\" -----------------------------------------------------------------
mfang@31876 43 .\" disable hyphenation
mfang@31876 44 .nh
mfang@31876 45 .\" disable justification (adjust text to left margin only)
mfang@31876 46 .ad l
mfang@31876 47 .\" -----------------------------------------------------------------
mfang@31876 48 .\" * MAIN CONTENT STARTS HERE *
mfang@31876 49 .\" -----------------------------------------------------------------
duke@2 50
rgallard@21743 51 .SH NAME
rgallard@21743 52 pack200 \- Packages a JAR file into a compressed pack200 file for web deployment\&.
rgallard@21743 53 .SH SYNOPSIS
rgallard@21743 54 .sp
rgallard@21743 55 .nf
tbell@2692 56
rgallard@21743 57 \fBpack200\fR [\fIoptions\fR] \fIoutput\-file\fR \fIJAR\-file\fR
rgallard@21743 58 .fi
rgallard@21743 59 .sp
rgallard@21743 60 Options can be in any order\&. The last option on the command line or in a properties file supersedes all previously specified options\&.
rgallard@21743 61 .TP
rgallard@21743 62 \fIoptions\fR
rgallard@21743 63 The command-line options\&. See Options\&.
rgallard@21743 64 .TP
rgallard@21743 65 \fIoutput-file\fR
rgallard@21743 66 Name of the output file\&.
rgallard@21743 67 .TP
rgallard@21743 68 \fIJAR-file\fR
rgallard@21743 69 Name of the input file\&.
rgallard@21743 70 .SH DESCRIPTION
rgallard@21743 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\&.
rgallard@21743 72 .PP
rgallard@21743 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:
rgallard@21743 74 .sp
rgallard@21743 75 .nf
rgallard@21743 76 \f3pack200 myarchive\&.pack\&.gz myarchive\&.jar\fP
rgallard@21743 77 .fi
rgallard@21743 78 .nf
rgallard@21743 79 \f3\fP
rgallard@21743 80 .fi
rgallard@21743 81 .sp
rgallard@21743 82 .SH OPTIONS
rgallard@21743 83 .TP
rgallard@21743 84 -r, --repack
duke@2 85 .br
rgallard@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:
rgallard@21743 87 .sp
rgallard@21743 88 .nf
rgallard@21743 89 \f3pack200 \-\-repack myarchive\-packer\&.jar myarchive\&.jar\fP
rgallard@21743 90 .fi
rgallard@21743 91 .nf
rgallard@21743 92 \f3pack200 \-\-repack myarchive\&.jar\fP
rgallard@21743 93 .fi
rgallard@21743 94 .nf
rgallard@21743 95 \f3\fP
rgallard@21743 96 .fi
rgallard@21743 97 .sp
tbell@2692 98
tbell@2692 99
rgallard@21743 100 The following example preserves the order of files in the input file\&.
rgallard@21743 101 .TP
rgallard@21743 102 -g, --no-gzip
rgallard@21743 103 .br
rgallard@21743 104 Produces a \f3pack200\fR file\&. With this option, a suitable compressor must be used, and the target system must use a corresponding decompresser\&.
rgallard@21743 105 .sp
rgallard@21743 106 .nf
rgallard@21743 107 \f3pack200 \-\-no\-gzip myarchive\&.pack myarchive\&.jar\fP
rgallard@21743 108 .fi
rgallard@21743 109 .nf
rgallard@21743 110 \f3\fP
rgallard@21743 111 .fi
rgallard@21743 112 .sp
tbell@2692 113
rgallard@21743 114 .TP
rgallard@21743 115 -G, --strip-debug
rgallard@21743 116 .br
rgallard@21743 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\&.
rgallard@21743 118 .TP
rgallard@21743 119 --keep-file-order
rgallard@21743 120 .br
rgallard@21743 121 Preserve the order of files in the input file\&. This is the default behavior\&.
rgallard@21743 122 .TP
rgallard@21743 123 -O, --no-keep-file-order
rgallard@21743 124 .br
rgallard@21743 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\&.
rgallard@21743 126 .TP
rgallard@21743 127 -S\fIvalue\fR , --segment-limit=\fIvalue\fR
rgallard@21743 128 .br
rgallard@21743 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\&.
tbell@2692 130
rgallard@21743 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\&.
rgallard@21743 132
rgallard@21743 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\&.
rgallard@21743 134
rgallard@21743 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)\&.
rgallard@21743 136 .TP
rgallard@21743 137 -E\fIvalue\fR , --effort=\fIvalue\fR
duke@2 138 .br
rgallard@21743 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\&.
rgallard@21743 140
rgallard@21743 141 The default is 5, to invest a modest amount of time to produce reasonable compression\&.
rgallard@21743 142 .TP
rgallard@21743 143 -H\fIvalue\fR , --deflate-hint=\fIvalue\fR
duke@2 144 .br
rgallard@21743 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\&.
rgallard@21743 146
rgallard@21743 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\&.
rgallard@21743 148
rgallard@21743 149 The \f3keep\fR value preserves deflation hints observed in the input JAR\&. This is the default\&.
rgallard@21743 150 .TP
rgallard@21743 151 -m\fIvalue\fR , --modification-time=\fIvalue\fR
duke@2 152 .br
rgallard@21743 153 The possible values are \f3latest\fR and \f3keep\fR\&.
tbell@2692 154
rgallard@21743 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\&.
rgallard@21743 156
rgallard@21743 157 If the value is \f3keep\fR, then modification times observed in the input JAR are preserved\&. This is the default\&.
rgallard@21743 158 .TP
rgallard@21743 159 -P\fIfile\fR , --pass-file=\fIfile\fR
duke@2 160 .br
rgallard@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\&.
rgallard@21743 162 .TP
rgallard@21743 163 -U\fIaction\fR , --unknown-attribute=\fIaction\fR
duke@2 164 .br
rgallard@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\&.
rgallard@21743 166
rgallard@21743 167 If the value is \f3error\fR, then the entire \f3pack200\fR command operation fails with a suitable explanation\&.
rgallard@21743 168
rgallard@21743 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\&.
rgallard@21743 170
rgallard@21743 171 If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&.
rgallard@21743 172 .TP
rgallard@21743 173 .nf
rgallard@21743 174 -C\fIattribute-name\fR=\fIlayout\fR , --class-attribute=\fIattribute-name\fR=\fIaction\fR
duke@2 175 .br
rgallard@21743 176 .fi
rgallard@21743 177 See next option\&.
rgallard@21743 178 .TP
rgallard@21743 179 .nf
rgallard@21743 180 -F\fIattribute-name\fR=\fIlayout\fR , --field-attribute=\fIattribute-name\fR=\fIaction\fR
duke@2 181 .br
rgallard@21743 182 .fi
rgallard@21743 183 See next option\&.
rgallard@21743 184 .TP
rgallard@21743 185 .nf
rgallard@21743 186 -M\fIattribute-name\fR=\fIlayout\fR , --method-attribute=\fIattribute-name\fR=\fIaction\fR
duke@2 187 .br
rgallard@21743 188 .fi
rgallard@21743 189 See next option\&.
rgallard@21743 190 .TP
rgallard@21743 191 .nf
rgallard@21743 192 -D\fIattribute-name\fR=\fIlayout\fR , --code-attribute=\fIattribute-name\fR=\fIaction\fR
duke@2 193 .br
rgallard@21743 194 .fi
rgallard@21743 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\&.
rgallard@21743 196
rgallard@21743 197 \f3some-layout-string\fR: The layout language is defined in the JSR 200 specification, for example: \f3--class-attribute=SourceFile=RUH\fR\&.
rgallard@21743 198
rgallard@21743 199 If the value is \f3error\fR, then the \f3pack200\fR operation fails with an explanation\&.
rgallard@21743 200
rgallard@21743 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\&.
rgallard@21743 202
rgallard@21743 203 If the value is \f3pass\fR, then the entire class is transmitted as though it is a resource\&.
rgallard@21743 204 .TP
rgallard@21743 205 -f \fIpack\&.properties\fR , --config-file=\fIpack\&.properties\fR
duke@2 206 .br
rgallard@21743 207 A configuration file, containing Java properties to initialize the packer, can be specified on the command line\&.
rgallard@21743 208 .sp
rgallard@21743 209 .nf
rgallard@21743 210 \f3pack200 \-f pack\&.properties myarchive\&.pack\&.gz myarchive\&.jar\fP
rgallard@21743 211 .fi
rgallard@21743 212 .nf
rgallard@21743 213 \f3more pack\&.properties\fP
rgallard@21743 214 .fi
rgallard@21743 215 .nf
rgallard@21743 216 \f3# Generic properties for the packer\&.\fP
rgallard@21743 217 .fi
rgallard@21743 218 .nf
rgallard@21743 219 \f3modification\&.time=latest\fP
rgallard@21743 220 .fi
rgallard@21743 221 .nf
rgallard@21743 222 \f3deflate\&.hint=false\fP
rgallard@21743 223 .fi
rgallard@21743 224 .nf
rgallard@21743 225 \f3keep\&.file\&.order=false\fP
rgallard@21743 226 .fi
rgallard@21743 227 .nf
rgallard@21743 228 \f3# This option will cause the files bearing new attributes to\fP
rgallard@21743 229 .fi
rgallard@21743 230 .nf
rgallard@21743 231 \f3# be reported as an error rather than passed uncompressed\&.\fP
rgallard@21743 232 .fi
rgallard@21743 233 .nf
rgallard@21743 234 \f3unknown\&.attribute=error\fP
rgallard@21743 235 .fi
rgallard@21743 236 .nf
rgallard@21743 237 \f3# Change the segment limit to be unlimited\&.\fP
rgallard@21743 238 .fi
rgallard@21743 239 .nf
rgallard@21743 240 \f3segment\&.limit=\-1\fP
rgallard@21743 241 .fi
rgallard@21743 242 .nf
rgallard@21743 243 \f3\fP
rgallard@21743 244 .fi
rgallard@21743 245 .sp
rgallard@21743 246
rgallard@21743 247 .TP
rgallard@21743 248 -v, --verbose
duke@2 249 .br
rgallard@21743 250 Outputs minimal messages\&. Multiple specification of this option will create more verbose messages\&.
rgallard@21743 251 .TP
rgallard@21743 252 -q, --quiet
duke@2 253 .br
rgallard@21743 254 Specifies quiet operation with no messages\&.
rgallard@21743 255 .TP
rgallard@21743 256 -l\fIfilename\fR , --log-file=\fIfilename\fR
duke@2 257 .br
rgallard@21743 258 Specifies a log file to output messages\&.
rgallard@21743 259 .TP
rgallard@21743 260 -?, -h, --help
rgallard@21743 261 .br
rgallard@21743 262 Prints help information about this command\&.
rgallard@21743 263 .TP
rgallard@21743 264 -V, --version
rgallard@21743 265 .br
rgallard@21743 266 Prints version information about this command\&.
rgallard@21743 267 .TP
rgallard@21743 268 -J\fIoption\fR
rgallard@21743 269 .br
rgallard@21743 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\&.
rgallard@21743 271 .SH EXIT\ STATUS
rgallard@21743 272 The following exit values are returned: 0 for successful completion and a number greater than 0 when an error occurs\&.
rgallard@21743 273 .SH NOTES
rgallard@21743 274 This command should not be confused with \f3pack\fR(1)\&. The \f3pack\fR and \f3pack200\fR commands are separate products\&.
rgallard@21743 275 .PP
rgallard@21743 276 The Java SE API Specification provided with the JDK is the superseding authority, when there are discrepancies\&.
rgallard@21743 277 .SH SEE\ ALSO
rgallard@21743 278 .TP 0.2i
rgallard@21743 279 \(bu
rgallard@21743 280 unpack200(1)
rgallard@21743 281 .TP 0.2i
rgallard@21743 282 \(bu
rgallard@21743 283 jar(1)
rgallard@21743 284 .TP 0.2i
rgallard@21743 285 \(bu
rgallard@21743 286 jarsigner(1)
mfang@31876 287 .RE
mfang@31876 288 .br
mfang@31876 289 'pl 8.5i
mfang@31876 290 'bp