Compiling "static" applications with SWT/GTK

Bryce McKinlay
Wed Dec 3 01:19:00 GMT 2003

On Dec 1, 2003, at 11:19 PM, Andrew Haley wrote:

> That's not really true, because of Java's Class.forName.  You have to
> include all of libgcj, because the linker can't tell what might be
> needed.
> As I have said here many times, the right thing to do is create a
> configure tool that splits libgcj into a number of components and
> allow the user to choose which ones they want.  But it's quite hard to
> solve the web of dependencies.

I think splitting libgcj up into many small peices would introduce more 
problems than it solves. 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. JET has a deployment/control panel application that does 
something like this.



More information about the Java mailing list