This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Size problem
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Pascal Lacroix <gargamel_lille at caramail dot com>
- Cc: java at gcc dot gnu dot org
- Date: Sun, 12 Jan 2003 15:20:05 -0500 (EST)
- Subject: Re: Size problem
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