This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Binary size of statically linked java application


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]