[kaffe] compiling rt.jar in Kaffe 1.1.4

Dalibor Topic robilad at kaffe.org
Wed Apr 28 08:16:02 PDT 2004

Hi Nils,

Nils Ratusznik wrote:
> Hello everybody!
> I'm trying de reduce the size of the Kaffe JVM, the final goal is to use
> Kaffe with uClinux on a Motorola Coldfire card.

Sounds good!

> I noticed that the rt.jar file is very big, and saw in the FAQ's it is
> possible to reduce its size. I managed to have a 1.9Mo rt.jar by
> suppressing files in the archive, but I think I could save more space by
> recompiling it.

Yes, you could leave the debugging information out for a simple start.

> The operation "make Klasses" in the "Compiling the classes" section of the
> FAQ embedded seems not to exist... I don't know what to do :(

in your build directory, cd libraries/javalib and *then* "make Klasses" 
(or just "make").

Another crazy idea off the top of my head would be to

* use some bytecode shrinking utility to reduce the size of the class 

* use a bytecode optimizer to 'optimize' methods in the class library

* use an obfuscator to keep only the classes required for your application

* split off runtime classes you don't need to load in your application 
into a separate archive and use something else (tar+bz2) to compress 
them (and a separate tar+bz2 aware class loader to access them)

* reduce coupling between library classes :)

dalibor topic

More information about the kaffe mailing list