Category: Java Native Interface (JNI)
-
C++, Java Native Interface (JNI)
In my recent Java Native Interface (JNI) adventures, I have discovered that when calling the JNI function NewObject in C++, you need to cast the variables to their corresponding jni type. I didn’t have to do this when using C and jni.Example:C++ struct ABC { double x, double y }; Using C++ create a jni…