This is the mail archive of the
mailing list for the Java project.
Re: gcj for j2me?
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Michael <mogmios at mlug dot missouri dot edu>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 08 Mar 2005 11:00:33 -0500
- Subject: Re: gcj for j2me?
- References: <422D0203.email@example.com>
How well does GCJ work for J2ME programs? Over on the mobile oss
development list (http://kavlon.org/index.php/mobile-oss) someone
asked and nobody seems to have much information. Anyone care to fill
us in? Thanks.
The compiler should be capable of supporting J2ME quite nicely, but
currently libgcj is targeted more-or-less exclusively at J2SE. Due to
the nature of J2SE, libgcj doesn't support static linking very well - if
you want to make it this well and get your binaries down to a size thats
realistic for a J2ME device, then you really need a stripped-down
runtime that targets the J2ME profiles exclusively.
Two approaches have been proposed for this:
1. Add configury/hacks to libgcj that enable features you don't need to
be disabled. Keep doing this until runtime is small enough.
2. Split the "core runtime" and "class library" components from libgcj
into separate libraries, so that different class library profiles can be
used. The core runtime would be modular and configurable enough that
features not necessarily needed for J2ME (eg reflection, bytecode
interpreter, networking, security, etc) can be disabled at configure time.
For various reasons I think #2 is a better approach in the long run, but
maybe you'd want to try #1if you want to get something working ASAP.