views:

70

answers:

2

I would like to compress a jar file as much as possible for distribution (for downloading over dial-up modem). Can pack200, which was included in jdk5, be used on pre-jdk5 class files?

To clarify, the target environment is jdk 1.4.x.

+1  A: 

I completely revised my answer here after trying pack200 and unpack200 on a set of JDK 1.4 compiled source files. It appears to work fine although I haven't tried running a compressed JAR. Another post claims to back this up also, see:

http://forums.sun.com/thread.jspa?threadID=5134671&tstart=1590

Jon
A: 

You can compress any classes using pack200, but you need Java 5+ to use the packed jars.

Peter Lawrey