I can make your gcj-compiled binaries much smaller.

Tom Tromey tromey@redhat.com
Tue Jan 14 21:33:00 GMT 2003


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

Andrew> We would need to find those classes in libgcj that are resolved by
Andrew> reflection and find a reasonable way to force them to be linked.
Andrew> However, I don't think we should get into the situation where libgcj
Andrew> contains static class references "in order to make static linkage
Andrew> work."  This is, to say the very least, bad software engineering
Andrew> practice and might well lead to all kinds of support headaches.

We already do a little of this.  See FirstThread.java.

Right now I think we only do this for classes required by the startup
code.  The problem with us doing it in general is that it eliminates
an advantage of static linking, namely removing classes you really
don't want.

The application developer can do it, as Adam suggests.  It seems to me
that this approach will be unreliable, though.  You can't always know
what classes you need to require; maybe an unusual code path requires
some class you omitted.

Tom



More information about the Java mailing list