This is the mail archive of the java@gcc.gnu.org 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: Question of the status of GCJ


Dalibor Topic wrote:
Marco Trudel wrote:
Andrew Haley wrote:
Mike Purdy wrote:
Thank you Andrew. This is interesting. Does the OpenJDK allow native compilation?

No.

But it would be possible with (relatively) less work. I have written a Java source code to Eiffel source code compiler using the OpenJDK classes for the standard library. I have mapped all Java language constructs and implemented the runtime far enough so that simple SWT applications can be compiled (kind of "proof of concept").
There is a good chance that I can find someone continuing the work on it the next half year. I'm hoping that it will then be usable with real applications and also for Linux/Mac.
If you're interested, the website is http://jaftec.origo.ethz.ch/


Thanks, Marco, that's an interesting use of the OpenJDK class library.

For those who are interested in the JENC internals, here some points that considerably facilitated the work I had to do (points where GCJ needs substantial additional effort):
- I don't need to replace any OpenJDK classes with own implementations. All classes (String, AWT/Swing, nio, xml, ...) can be taken directly from OpenJDK. So there's no danger of bringing additional bugs in and the quality of OpenJDK can be reused.
- The same applies for the native libraries. All except jvm.dll can be reused without modification (even java.dll). jvm.dll has to be reimplemented because it's specific to the Sun (OpenJDK) JVM. A built-in JNI implementation allows this reuse of the libraries.
- Since the Java classes are simply transliterated to Eiffel and Eiffel is also a high level programming language, stuff like exceptions and a garbage collector come naturally.



So, if GCJ will be redone for OpenJDK (what would be great because there's a big community), I hope they could also choose a similar approach for not needing an own implementation of classes (and therefore also keep the OpenJDK native libraries).



have a nice day Marco

cheers,
dalibor topic


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