4176N/A." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A."
0N/A." This code is free software; you can redistribute it and/or modify it
0N/A." under the terms of the GNU General Public License version 2 only, as
0N/A." published by the Free Software Foundation.
0N/A."
0N/A." This code is distributed in the hope that it will be useful, but WITHOUT
0N/A." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A." version 2 for more details (a copy is included in the LICENSE file that
0N/A." accompanied this code).
0N/A."
0N/A." You should have received a copy of the GNU General Public License version
0N/A." 2 along with this work; if not, write to the Free Software Foundation,
0N/A." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A."
2362N/A." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A." or visit www.oracle.com if you need additional information or have any
2362N/A." questions.
1178N/A."
4880N/A.TH pack200 1 "16 Mar 2012"
0N/A
0N/A.LP
1178N/A.SH "Name"
0N/Apack200 \- JAR Packing tool
0N/A.LP
0N/A.SH "SYNOPSIS"
0N/A.LP
0N/A.LP
0N/A\f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP
0N/A.LP
0N/A.LP
0N/AOptions may be in any order. The last option on the command line or in a properties file supersedes all previously specified options.
0N/A.LP
0N/A.RS 3
0N/A.TP 3
0N/Aoptions
0N/ACommand\-line options.
0N/A.TP 3
0N/Aoutput\-file
0N/AName of the output file.
0N/A.TP 3
0N/AJAR\-file
0N/AName of the input file.
1178N/A.RE
1178N/A
0N/A.LP
0N/A.SH "DESCRIPTION"
0N/A.LP
0N/A.LP
0N/AThe \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.
0N/A.LP
0N/A.LP
0N/AThe \f2pack200\fP tool uses several options to fine\-tune and set the compression engine.
0N/A.LP
0N/A.SS
0N/ATypical usage:
0N/A.LP
0N/A.LP
0N/A\f2% pack200 myarchive.pack.gz myarchive.jar\fP
0N/A.LP
0N/A.LP
0N/AIn this example, \f2myarchive.pack.gz\fP is produced using the default \f2pack200\fP settings.
0N/A.LP
0N/A.SH "OPTIONS"
0N/A.LP
0N/A.LP
0N/A\f4\-r \-\-repack\fP
0N/A.LP
0N/A.LP
0N/AProduces 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.
0N/A.LP
0N/A.LP
0N/A\f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP
0N/A.LP
0N/A.LP
0N/A\f2% pack200 \-\-repack myarchive.jar\fP
0N/A.LP
0N/A.LP
0N/A\f4\-g \-\-no\-gzip\fP
0N/A.LP
0N/A.LP
0N/AProduces a \f2pack200\fP file. With this option a suitable compressor must be used, and the target system must use a corresponding decompresser.
0N/A.LP
0N/A.LP
0N/A\f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP
0N/A.LP
0N/A.LP
0N/A\f4\-G \-\-strip\-debug\fP
0N/A.LP
0N/A.LP
0N/AStrips 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.
0N/A.LP
4176N/A.LP
4176N/A\f4\-\-keep\-file\-order\fP
4176N/A.LP
4176N/A.LP
4176N/APreserve the order of files in the input file; this is the default behavior.
4176N/A.LP
0N/A.LP
0N/A\f4\-O \-\-no\-keep\-file\-order\fP
0N/A.LP
0N/A.LP
0N/AThe 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.
0N/A.LP
0N/A.LP
0N/A\f4\-Svalue \-\-segment\-limit=\fP\f2value\fP
0N/A.LP
0N/A.LP
0N/AThe value is the estimated target size N (in bytes) of each archive segment. If a single input file requires
0N/A.br
0N/Amore 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.
0N/A.LP
0N/A.LP
0N/AThe 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.
0N/A.LP
0N/A.LP
4176N/AThe 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.
0N/A.LP
0N/A.LP
0N/AA 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).
0N/A.LP
0N/A.LP
0N/A\f4\-Evalue \-\-effort=\fP\f2value\fP
0N/A.LP
0N/A.LP
0N/AIf 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.
0N/A.LP
0N/A.LP
0N/AThe default is \f25\fP, investing a modest amount of time to produce reasonable compression.
0N/A.LP
0N/A.LP
0N/A\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
0N/A.LP
0N/A.LP
0N/AOverrides the default, which preserves the input information, but may cause the transmitted archive to be larger. The possible values are:
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/Atrue
0N/A.TP 3
0N/Afalse
0N/AIn 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.
1178N/A.RE
1178N/A
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/Akeep
0N/APreserve deflation hints observed in the input JAR. (This is the default.)
1178N/A.RE
1178N/A
0N/A.LP
0N/A.LP
0N/A\f4\-mvalue \-\-modification\-time=\fP\f2value\fP
0N/A.LP
0N/A.LP
0N/AThe possible values are:
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/Alatest
0N/AThe 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.
0N/A.TP 3
0N/Akeep
0N/APreserves modification times observed in the input JAR. (This is the default.)
1178N/A.RE
1178N/A
0N/A.LP
0N/A.LP
0N/A\f4\-Pfile \-\-pass\-file=\fP\f2file\fP
0N/A.LP
0N/A.LP
0N/AIndicates 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.
0N/A.LP
0N/A.LP
0N/A\f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP
0N/A.LP
0N/A.LP
0N/AOverrides 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:
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/Aerror
0N/AThe \f2pack200\fP operation as a whole will fail with a suitable explanation.
0N/A.TP 3
0N/Astrip
0N/AThe attribute will be dropped. Note: Removing the required VM attributes may cause Class Loader failures.
0N/A.TP 3
0N/Apass
0N/AUpon encountering this attribute, the entire class will be transmitted as though it is a resource.
1178N/A.RE
1178N/A
0N/A.LP
0N/A.LP
0N/A\f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP
0N/A.br
1178N/A\f4\-Fattribute\-name=\fP\f2layout\fP \f3\-\-field\-attribute=\fP\f2attribute\-name=action\fP
0N/A.br
1178N/A\f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP
0N/A.br
1178N/A\f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP
0N/A.LP
0N/A.LP
0N/AWith 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:
0N/A.LP
1178N/A.RS 3
0N/A.TP 3
0N/Asome\-layout\-string
0N/AThe layout language is defined in the JSR 200 specification.
0N/A.LP
0N/AExample: \f2\-\-class\-attribute=SourceFile=RUH\fP
0N/A.TP 3
0N/Aerror
0N/AUpon encountering this attribute, the pack200 operation will fail with a suitable explanation.
0N/A.TP 3
0N/Astrip
0N/AUpon encountering this attribute, the attribute will be removed from the output. Note: removing VM\-required attributes may cause Class Loader failures.
1178N/A.RE
1178N/A
0N/A.LP
0N/A.LP
0N/AExample: \f2\-\-class\-attribute=CompilationID=pass\fP will cause the class file containing this attribute to be passed through without further action by the packer.
0N/A.LP
0N/A.LP
0N/A\f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP
0N/A.LP
0N/A.LP
0N/AA configuration file, containing Java properties to initialize the packer, may be specified on the command line.
0N/A.LP
0N/A.LP
0N/A\f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP
0N/A.br
0N/A\f2% more pack.properties\fP
0N/A.br
0N/A\f2# Generic properties for the packer.\fP
0N/A.br
0N/A\f2modification.time=latest\fP
0N/A.br
0N/A\f2deflate.hint=false\fP
0N/A.br
0N/A\f2keep.file.order=false\fP
0N/A.br
0N/A\f2# This option will cause the files bearing new attributes to\fP
0N/A.br
0N/A\f2# be reported as an error rather than passed uncompressed.\fP
0N/A.br
0N/A\f2unknown.attribute=error\fP
0N/A.br
0N/A\f2# Change the segment limit to be unlimited.\fP
0N/A.br
0N/A\f2segment.limit=\-1\fP
0N/A.LP
0N/A.LP
0N/A\f4\-v \-\-verbose\fP
0N/A.LP
0N/A.LP
0N/AOutputs minimal messages. Multiple specification of this option will output more verbose messages.
0N/A.LP
0N/A.LP
0N/A\f4\-q \-\-quiet\fP
0N/A.LP
0N/A.LP
0N/ASpecifies quiet operation with no messages.
0N/A.LP
0N/A.LP
0N/A\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
0N/A.LP
0N/A.LP
0N/ASpecifies a log file to output messages.
0N/A.LP
4176N/A.LP
4176N/A\f4\-? \-h \-\-help\fP
4176N/A.LP
0N/A.LP
4176N/APrints help information about this command.
0N/A.LP
4176N/A.LP
4176N/A\f4\-V \-\-version\fP
0N/A.LP
0N/A.LP
4176N/APrints version information about this command.
4176N/A.LP
4176N/A.LP
4176N/A\f4\-J\fP\f2option\fP
0N/A.LP
4176N/A.LP
4176N/APasses \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.
4176N/A.LP
0N/A.SH "EXIT STATUS"
0N/A.LP
0N/A.LP
0N/AThe following exit values are returned:
0N/A.LP
0N/A.LP
0N/A\f2\ 0\fP for successful completion;
0N/A.LP
0N/A.LP
0N/A\f2>0\fP if an error occurs.
0N/A.LP
0N/A.SH "SEE ALSO"
0N/A.LP
0N/A.RS 3
0N/A.TP 2
1178N/Ao
1178N/Aunpack200(1)
0N/A.TP 2
1178N/Ao
1178N/A.na
1178N/A\f2Java SE Documentation\fP @
1178N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/index.html
0N/A.TP 2
1178N/Ao
0N/A.na
0N/A\f2Java Deployment Guide \- Pack200\fP @
0N/A.fi
4880N/Ahttp://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
0N/A.TP 2
1178N/Ao
1178N/Ajar(1) \- Java Archive Tool
0N/A.TP 2
1178N/Ao
1178N/Ajarsigner(1) \- JAR Signer tool
1178N/A.TP 2
1178N/Ao
1178N/A\f2attributes(5)\fP man page
0N/A.RE
0N/A
0N/A.LP
0N/A.SH "NOTES"
0N/A.LP
0N/A.LP
0N/AThis command should not be confused with \f2pack(1)\fP. They are distinctly separate products.
0N/A.LP
0N/A.LP
1178N/AThe Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
1178N/A.LP
0N/A