Going native (another article about GCJ)

Another article about GCJ and CNI (Programmer’s Toolchest) in the July number of Dr. Dobb’s Journal by Gene Sally. It compares CNI with traditional JNI:

CNI contains well thought out constructs for method invocation, property access, exception handling, and synchronization. Using these constructs instead of their JNI procedural equivalents means you can get the same work done using less code. […] the philosophy behind how you interact with java from a native perspective is much different, in a good, geeky kind of way. […] When workig in CNI, you have the feeling of working in situ with the java class; gone is the messy code necessary to bridge the two languages. […] CNI offers a great way to program in native code when working with the GCJ compiler front end. The way CNI maps your java classes into C++ classes reliefs you from the drudgery typically associated with JNI-coded interfaces and lets you use the constructs offered by C++ in concert with your java code. If you have a chance, give this technology a try. You won’t be disappointed.

Note that th article refers to the old CNI name, these days CNI stands for ‘Compiled Native Interface’. And the old paper that the article mentions has been updated and incorporated into the GCJ reference manual (About CNI).