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: Invoking GIJ from SunJDK Swing app?


>>>>> "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


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