This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj for j2me?

Michael wrote:

How well does GCJ work for J2ME programs? Over on the mobile oss development list ( 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]