Binary size of statically linked java application
Marco Trudel
mtrudel@gmx.ch
Tue Nov 28 18:12:00 GMT 2006
Joel Dice wrote:
> <snip>
>>>> You don't need to rebuild GCJ. Thats why I meant that my approach is
>>> easier to maintain. What you have to do:
>>> - extract all objects from the libgcj archive (ar x libgcj.a)
>>> - remove the ones you don't need
>>> - create the new archive (ar q libgcj.a *.o)
>>> - compile your application again
>>>>>> Of course you will now get unresolved depencies because your objects
>> are
>>> referenced from other classes in the class library. For those you have
>>> to write stubs (minimal classes) and add them to the compilation.
>>> It needs quite some time, but it's worth the effort...
>> How many stubs did you need to write to cut out Swing, AWT,
36. But the biggest part is because of AWTCallbackHandler and
SwingCallbackHandler. Removing these classes before compiling GCJ would
make real sense...
> and javax.crypto?
15
Marco
More information about the Java
mailing list