Essential Jni: Java Native Interface (Essential Java)
Book Details
Description
First things first. As is customary in programming books, the author starts with a "Hello, World" example, except here, the program is written in both C and Java. Gordon walks you through the source code in each language, explains compilation, and quickly gets to the mechanics of using the javah utility to generate an include-able .h file.
After the procedural walk-though, Gordon strides into specifics, such as how to get a C/C++ program to set a variable that exists in a Java program and how to deal with native types. He compares object architectures and gets into some detail on arrays, strings, exceptions, and producer-consumer relationships. You'll find plenty of information on input and output, too--the author shows the means of writing to POSIX and Win32 ports. A cool chapter has to do with setting up the Java Developer's Kit as a Windows NT service via the Service Control Manager.
A full JNI class reference with minimal annotation ends the book.
