Invoking GIJ from SunJDK Swing app?

Tom Tromey tromey@redhat.com
Tue Sep 26 16:27:00 GMT 2006


>>>>> "Mike" == Mike Purdy <purdymi@binghamtonschools.org> writes:

Mike> Maybe I'm looking at this the wrong way. If I compile my custom
Mike> class to native via gcj, could I just call it from the SunJDK
Mike> running app via JNI?
Not really, I'm afraid.
I mean, perhaps it could be done -- but perhaps not. And I'd guess it
is unlikely to provide a performance benefit.
Mike> I mean, if it is native, then I shouldn't really need to invoke
Mike> another vm (gij). Is this true?
No. Java requires substantial runtime support, whether it is
precompiled or JITted. With gcj this runtime support is all in
libgcj.so -- if you look at gij you'll see it is really just a short
main() that makes calls into libgcj. So, you're still carrying a "VM"
around.
Due to JVMs supporting the invocation API, libgcj doesn't even really
look all that different from a standard VM. Mostly the differences
are in the "execution engines". (There's also implementation
differences in the GCs, but that is a different kind of thing.)
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /