This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Mixing native and bytecode (Swing)?
- From: Jeff Sturm <jsturm at one-point dot com>
- To: John Moore <gcj at jmsd dot co dot uk>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 6 Oct 2003 12:17:50 -0400 (EDT)
- Subject: Re: Mixing native and bytecode (Swing)?
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
requires.
(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.)
Jeff