Calling C from Java
Structure of a JNI Program
JNI really consists of two parts -- the ability to implement Java methods using native code, and the "Invocation API," which allows a native application to embed the Java VM. We're going to focus on the first approach, so our programs will start as Java programs which use native code to implement some methods.
Native methods can be
The general steps required to implement our example will be: