pack200.exe : Java Glossary
home P words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
I-ching hexgram 64, almost here pack200.exe
A little fox crosses a stream in China. If he goes a little too boldly and confidently — unlike a wiser older fox — he is likely to get wet. At the very end of his crossing, his over-confidence reaches its peak, he feels his feet on dry ground, he relaxes his vigilance and his tail drops into the water.
~ I Ching
pack200.exe is Sun’s compression utility in JDK 1.5+ for supercompressing large (> 2 MB) jars of class files. The resulting file has a *.jar.pack.gz extension and a application/x-java-pack200 MIME type and pack200-gzip content encoding type.

The Catches

  1. You must modify your HTTP server to deliver jars in three flavours, *.jar, *.jar.gz and *.jar.pack.gz based on generic *.jar requests. You must prepare and upload all three flavours of jar.
  2. Pack200.exe and Unpack200.exe are native utilities, not java classes. You must do all your handling of such jars via external exec of these JRE command line utilities.
  3. Signed jars that have been packed with pack200.exe cannot be verified until they have been unpacked with unpack.exe.
  4. Pack200.exe is specialised for class files. If your jar is mainly resources, you are better off to create a jar of stored (uncompressed) entries, then compress the whole thing with GZIP. This works considerably better than GZIPping a file of already compressed entries. Then you will have a *.jar.gz extension and gzip content encoding. It will have have to be unzipped at the other end, and there it will sit on disk in completely uncompressed form.
  5. Packed files don’t have a simple unique extension, thus they can’t be easily handled by the extension to MIME tables in an HTTP server. They require custom coding.
Sun’s JDK Tool Guide to pack200.exe : available:
Sun’s Javadoc on the Pack200 class : available:
Sun’s JDK Technote Guide on server and pack200 : available:

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] Spread the Net
You are visitor number 7,451.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/pack200exe.html J:\mindprod\jgloss\pack200exe.html