This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj-compiled HelloWorld.exe size
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Boris Kolar <boris dot kolar at globera dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 16 Jan 2003 00:17:51 -0500 (EST)
- Subject: Re: gcj-compiled HelloWorld.exe size
On Thu, 16 Jan 2003, Boris Kolar wrote:
> Many people don't need most libgcj classes anyway, so why should every
> executable contain them? I'd like to have a stripped-down version of libgcj,
> which would contain only the most basic classes (Object, Class, maybe String).
Consider that java.lang.String is vital to the runtime, and the example
you've tried directly initializes java.lang.System, java.io.PrintStream,
and indirectly needs Properties, Runtime, OutputStream, and a whole host
of other classes. You may be able to trim down the size somewhat, but
it'll never be as small as those three classes you mention.
How small do you require? I suspect that with some careful hacking a 2x
reduction of HelloWorld.exe could be achievable. However if you need
100KB standalone executables, Java is probably the wrong language for you.
Jeff