Hello,
I am creating a DLL for JNI and therefore have a question. I create a class in Java with the native method. Then I create many objects of this class. The native method implementation contains beside the implementation of a method a few member variables. E.g.
jint a;
JNIEXPORT void JNICALL
Java_Refs_displayMsg (JNIEnv * env, jobject obj, jint b)
{
a = b;
}
My question is how this member data variable is being stored? Is it being stored per class, per object or in some other way? So, for example, if I call this native method in relation to one object - “obj1.displayMsg(1)” and then in relation to another object like - “obj2.displayMsg(3)”, would the variable “a” be changed? And how and where the system would store this value?
Also where I may find more information on that subject?
Thank you,
Kostya.
