JNI or Java Native Interface is a Java framework that allows Java code running a JVM to interact with native code outside of the virtual machine.
JNI is part of standard Java, it’s used in areas where Java must escape its VM, such as for disk access and sound.
Interaction through JNI is notably slow, however sometimes JNI is used to execute fast native code for an overall speed savings.
Other with using JNI include difficulty in using the API, and the natural removal of some of Java’s benefits, such as cross platform support and automatic garbage collection.