Define JNI functions and pointers

Define JNI functions and pointers.

- JNI functions are those which are used by the developers to interact with JVM within a native method. Every JNI function receives a special parameter as its first argument – JNIEnv ; which points to a special JNI data structure of the type JNIEnv_ . One of the elements of JNI data structure is a ‘pointer to an array’ generated by JVM, and each element of this array is again a pointer to a JNI function. A JNI function can be invoked from the native method by referencing these pointers. Every JVM provides a unique implementation of the JNI functions.
Describe exception handling in JNI
JNI exceptions can be handled by using C++ exception handling. Using throw and catch blocks of C++ and invoking those methods through JNI is one of the solutions...
Advantages and disadvantages of using JNI
Developers can take the advantage of Java platform. Legacy code investments need not be abandoned, Interoperability issues can be addressed..
What is JTA?
What is JTA? - Java Transaction API is a standard between the transaction manager and the entities participated in the distributed transaction system...
Post your comment