Passing Java primitives to native code
The simplest kinds of elements we can handle with JNI are Java primitive types. Indeed, both the Java and native side use practically the same representation for this kind of data which, does not require any specific memory management.
In this part, we will see how to pass integers to the native side and send them back to the Java side.
Note
The resulting project is provided with this book under the name Store_Part6
.