This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Minimal libjava for embedded applications?
- From: "Joshua Shagam (NY)" <jshagam at guillemot dot com>
- To: java at gcc dot gnu dot org
- Date: Wed, 16 Feb 2005 10:30:30 -0500
- Subject: Minimal libjava for embedded applications?
Hello. My company is currently working on software for a number of mobile
platforms, notably J2ME and BREW (Qualcomm's native-code mobile applications
platform, intended to compete with J2ME), and we have been investigating the
use of gcj to improve our development process, as we are now starting a very
ambitious project but we cannot spare the resources to develop and maintain
two separate language versions simultaneously.
So far it seems likely that we will be able to use gcj-arm and simply write
our own BREW bindings via CNI. However, even the most minimal programs
swell to about 1MB in size as soon as libjava is linked in, while BREW
applications are limited to around 300KB total. It seems that most of this
space is taken up by library functions we don't actually use; if there is
any link-time dead-stripping going on, it isn't doing a very thorough job.
I was wondering if there has already been any work into making a minimal
libjava for use with gcj which only provides the bare minimum necessary to
get a basic application running. Specifically, all we need are the basic
class objects (java.lang.Object, java.lang.String/StringBuffer, and their
various dependencies) and the garbage collector. However, it looks like
simply implementing our own java.lang.Object and having it work with the
garbage collector would be fairly nontrivial.
Is there already a minimal libjava for embedded applications, and if not,
how difficult would it be to write one or adapt the existing libjava for
this purpose?
Many thanks in advance.
Joshua Shagam
Guillemot Inc.