Mixing native and bytecode (Swing)?

Jeff Sturm jsturm@one-point.com
Mon Oct 6 16:17:00 GMT 2003

On Mon, 6 Oct 2003, John Moore wrote:
> >You see, gcj and the JRE are really separate products and don't
> >interoperate whatsoever.  So there are probably technical hurdles and
> >perhaps licensing also.
> This is what I don't really understand, because I thought that GIJ was a
> fully-fledged JVM, able to run any existing classes, and that GCJ was able
> to compile any Java source to bytecode as well as native code.

That's true for the most part.  Sun's core classes have a special status,
though.  They may utilize sun.* classes that aren't part of libgcj (just
as libgcj's java.awt utilizes gnu.* classes that won't be in the JRE).

Also I'd expect problems with native methods, since the DSO's that Sun
ships may make many assumptions about the runtime beyond what JNI

(I've never tried anything like this, except for a brief attempt to
compile Sun's javac with gcj.  But I've heard stories leading me to
believe it is difficult or impossible.)


More information about the Java mailing list