Compiling "static" applications with SWT/GTK

Andrew Haley aph@redhat.com
Wed Dec 3 10:42:00 GMT 2003


Andrew Haley writes:
 > Bryce McKinlay writes:
 > 
 >  > My idea for static applications is to have a runtime option that
 >  > dumps out a list of classes that are actually initialized/used by
 >  > the application, which is then fed back into the compiler (and
 >  > maybe combined with some static analysis) to generate an optimized
 >  > static executable that contains only the required bits of the
 >  > runtime.
 > 
 > Not a bad idea, but this seems very fragile.  How would anyone know
 > for sure which classes an application needed?  A few test runs
 > wouldn't do it.

Thinking about this some more, this seems like an ideal candidate for
the "gcj JIT".  Whenever a class is initialized, compile its code and
leave a copy of a .o file in a directory.  To build the application,
just link all the .o files together.

Andrew.



More information about the Java mailing list