GCJ support for Java 1.5

Solly Ezekiel sezekiel@blue.aero
Wed Feb 6 20:54:00 GMT 2008


I have a question I haven't seen addressed in the FAQ and mailing lists.  Specifically, are there plans for gcj under Cygwin to support Java 1.5 features such as generics?

The gcj web page (http://www.gnu.org/software/gcc/java/) says Java 1.5 language support is available as of gcc v4.3, but Cygwin is up to only v3.4 of gcc.  I have tried a few workarounds, all unsuccessfully:

        * Use the Java 1.5 compiler to compile the Java to bytecode, then use gcj to compile the bytecode: doesn't work because of new Java system calls (such as System.nanoTime).

        * Use the Java 1.5 compiler to produce bytecode for an earlier release of Java (say 1.2), then use gcj to compile the bytecode: doesn't work because if you're going to produce 1.2 bytecode, you have to be compiling 1.2 source.

        * Use the Java 1.5 rt.jar as the boot class library for gcj: causes gcj to quit with a cryptic error about memory size (which I haven't investigated further).

One thing I haven't tried is to download and compile gcc v4.3 from source.  Otherwise it looks like my best bet is to wait until gcj can compile Java 1.5, and implement things a different way (e.g. using JNI) for now.  Or is there a better way?

Sol Ezekiel

Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list