Optimizing for download size

Øyvind Harboe oyvind.harboe@zylin.com
Thu Nov 21 16:23:00 GMT 2002


Does GCJ have an option to aggressively optimise for download or zipped size(*)?

- I'm using Java and Eclipse SWT instead of Visual Basic and there
is one area where Visual Basic scores over Java: download size.

- My application uses JNI in order to use SWT and serial communication(using either 
javax.comm from Sun or www.serialio.com). I'm following the exiting JNI developments 
closely. :-)

- Presumably such "aggressive" size optimisation would need a list
of all classes and maybe even methods actually used by the program. 
I suppose some first approximation could be done by scanning the 
class dependencies starting out from "main", but perhaps running the
app with some instrumentation to generate a "use list" would make
more sense(where the user would be responsible for exercising all
code paths).

* My application will be zipped for download, and I don't particularly care 
how big the application is unzipped. My initial attempt
at using GCJ for a straightforward "hello world" gave me a 2.5MB exe 
file that was 700k zipped. Thats pretty darn good! 



More information about the Java mailing list