Size problem

Jeff Sturm jsturm@one-point.com
Sun Jan 12 20:20:00 GMT 2003


On Sun, 12 Jan 2003, Pascal Lacroix wrote:
> I tried to compile a simple Hello world program (which only
> does a System.out.println("Hello World")) and I remarked
> that the executable was very big (at least 1Mb).

This comes up often; it ought to be in the FAQ (I checked;
unfortunately /java/faq.html appears to be barely maintained).

It seems to me that no Java program is very simple... try "java
-verbose:class Hello" for instance.  I counted 240 classes loaded by the
JDK 1.3.

What gcj is doing is compiling all of those startup classes into your
executable.

Jeff



More information about the Java mailing list