next up previous
Next: Related Work Up: Compressing Java Class Files Previous: Eager class loading

Jar functionality

Java jar files provide functionality beyond just being an archive of class files. In particular, jar files can contain non-class files (gif images, property files) and the jar manifest, which contains information such as digital signatures.

The basic solution to this is to combine a packed java archive with a standard jar file that contains all of the non-class files from the jar archive being emulated. One issue that needs to be dealt with is that compressing and decompressing a Java classfile using the format proposed in this paper will likely modify the classfile by renumbering the constant pool. Thus, any signatures for the original classfiles will be invalid for the decomposed classfiles. However, the decompression is deterministic: decompression of a packed archive will always result the identical set of classfile. Therefore, if you wish to sign your classfiles, you must use the following approach: compress the classfiles, and then decompress the classfiles. Sign the decompressed classfiles, and ship the signed manifest from the decompressed classfiles along with the packed archive.



William Pugh