Hi I m trying to access a private long variable from my cpp(jni) file. Problem is when I do GetLongField on Field Id , I get zero , even though i have set the long variable in Java to non-zero value.
In Java long definition is : private long mActualTrack = 0; In Cpp file , filed Id is obtained by : gf_identifier = env->GetFieldID(clazz, "mActualTrack", "J"); clazz represents Java Class which contains mActualTrack where gf_identifier is declared as static jfieldID gf_identifier; Now I used GetLongField as follows jlong id_j = env->GetLongField(myobj, gf_identifier); I do identifier = (unsigned long long)id_j; , and print its value, But I am always getting 0. Can anyone explain this behavior or am I doing anything wrong in my implementation?? Regards, Ajith -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en