GCJ for eCos
fernando@lozano.eti.br
fernando@lozano.eti.br
Fri Jun 6 18:23:00 GMT 2003
Hi,
> I think it would be a good idea to split java (the language) from libraries.
> That would make gcj suitable for embedded systems. C compiles HelloWorld
> application to 5K, while java still produces static executables of over 1M size
> (tested for mingw).
>> It's a bit more complicated task than it may seem. Object, the base for all java
> objects references Class, which references ClassLoader, InputStream, etc. Soon
> you find out that Object alone (indirectly) produces 72 dependancies, if you
> insist of being signature compatible with Sun's JDK. The good news is, that
> those 72 classes are mostly simple, many of them being exception classes.
>> The second problem is that gcj's implementation of java the language itself
> requires some of the library classes. For example, if you remove StringBuffer,
> you can't do 'String a = b + "something"' anymore, because '+' operator uses
> StringBuffer.
There problems were also faced by Sun when creating J2ME. They use a VERY
different VM and base classes are not 100% compatible with the same ones on
J2SE. I guess someone should check if it's safe to use the specs to create
GCJME. :-)
[]s, Fernando Lozano
More information about the Java
mailing list