Java native Interface (JNI) is a programming framework that allows Java code to interact with code written in another language, typically C or C++. JNI enables one to write native methods to handle situations when an application cannot be written entirely in the Java programming language.
It is also used to modify an existing application written in another programming language to be accessible to Java applications. Many of the standard library classes depend on JNI to provide functionality to the developer and the user. The Java Development Kit (JDK) provides tools and library routines that help the Java programmer interface with native code. It is important that the data types that are passed between Java and native code have the same properties. Like jboolean data type of native language is same as Boolean data type of Java.
Please refer the below link
http://en.wikipedia.org/wiki/Java_Native_Interface
http://java.sun.com/docs/books/jni/