Invoking GIJ from SunJDK Swing app?

Mike Purdy purdymi@binghamtonschools.org
Sun Sep 17 17:48:00 GMT 2006


I'm writing a processing class that will be used in an existing Swing/SunJDK based application on Mac OSX and Linux.  I would like to compile my class to native with gcj and use gij to access it (for speed and AOT optimization purposes).  

My thought is that I could write a c++ library that would be called by the Swing application via JNI.  This library could then invoke the gij runtime via CNI and load the natively compiled library.  The c++ library would act as a bridge between the two distinct java runtimes.  I realize that I would have the overhead of two runtimes, but I still believe the speed payoff could be worth it.  

Does anyone have experience with invoking gij via CNI or could anyone comment on the prudence of my thinking as I map out this possible process?

Mike



More information about the Java mailing list