The Java Native Interface (JNI) allows programmers
to write Java code which interacts with native code written
in other languages, such as C, C++, or assembly language. JNI can be used to write
native methods when the Java language is not
suitable for the task, such as:
The native code can use and update Java objects, call Java code, and throw Java exceptions. JNI can be thought
of as the "glue" between Java and native code.