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


Lehner, Michael wrote:
-----Original Message-----
From: java-owner@gcc.gnu.org [mailto:java-owner@gcc.gnu.org] On Behalf
Of
Marco Trudel
Sent: Tuesday, November 28, 2006 7:13 PM
To: Joel Dice
Cc: Lehner, Michael; gnustuff@thisiscool.com; java@gcc.gnu.org
Subject: Re: Binary size of statically linked java application

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


[Lehner, Michael] I first tried to get away from AWT, this was very easy. I had to write 3
classes and 4 functions I think.

Then you did something wrong and your executable is probably only about 50kb smaller. It's not done by removing awt.o. There are about 30 objects for awt...



I think it would be helpful if there would be a libgcj.a, that means a
classpath, without any implementation, but only empty functions.

I don't know what you mean by this...


When
minimizing de code you would only have to remove an original file from
it and use instead the one with the same name from the other library
with only the function names inside.

They still would have to be precompiled. So the only difference is that all objects are now in an archive and you suggest to put them into a directory. Doesn't change that much (unless I understand you wrong).
Anyway, you can keep the original libgcj.a as I described earlier. So, you have to do even less than in the solution you suggest. Just add the stub and the classes won't be pulled in... No need to replace files or jars or whatever...



Marco



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