[kaffe] compiling rt.jar in Kaffe 1.1.4

2004-04-28 Thread Nils Ratusznik
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.

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.

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 :(

If someone can help me...
Thanks a lot in advance.
-- 
Nils Ratusznik
Linux User #339713



___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] compiling rt.jar in Kaffe 1.1.4

2004-04-28 Thread Dalibor Topic
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 
library

* 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 :)

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] compiling rt.jar in Kaffe 1.1.4

2004-04-28 Thread Dalibor Topic
Hi Nils,

Nils Ratusznik wrote:

I did it... Here is the result :
$ make (or make Klasses, the result is the same)
cp /home/nils/kaffe-1.1.4/./libraries/javalib/rt-precompiled.jar rt.jar
After reading the FAQ about compiling the class library I tried to use the
autogen.sh script, without good results : autogen destroyed aclocal.m4 and
then complained about the fact it couldn't find it :(
Ouch.

Try reconfiguring with --with-rt-jar=no. That will force the class 
library to be rebuilt.

Okay, I'm very intersted... what are the names of these wonderful
utilities? I used strip in order to reduce .so files, but it doesn't
work with rt.jar since it is an archive, not a binary-object file :(
BLOAT [1], jarg [2], ProGuard [3], Jode [4], other alternatives are on 
[5], [6], and finally, there is Soot [7], too.

I haven't really used any of these, so I can't say whether they would a) 
work at all, and b) work well. But if you need further class library 
size reductions via automated tools beside what removing the debug 
information can give you, you should have a look at these programs.

According to http://proguard.sourceforge.net/results.html, ProGuard is 
able to shave off some 300k from Classpath's rt.jar.

cheers,
dalibor topic
[1] http://www.cs.purdue.edu/s3/projects/bloat/
[2] http://sourceforge.net/projects/jarg/
[3] http://proguard.sourceforge.net/
[4] http://jode.sourceforge.net/
[5] http://proguard.sourceforge.net/alternatives.html
[6] 
http://dmoz.org/Computers/Programming/Languages/Java/Development_Tools/Obfuscators/
[7] http://www.sable.mcgill.ca/soot/

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe