I am calling a Java method from C ++ through JNI. The Java method returns enum STATUS. I already have assignments representing the enumerations in my C ++ code, for example here: https://stackoverflow.com/a/316677/
jclass clSTATUS = env->FindClass("MyClass$STATUS"); jfieldID fidONE = env->GetStaticFieldID(clSTATUS , "ONE", "LMyClass$STATUS;"); jobject STATUS_ONE = env->GetStaticObjectField(clSTATUS, fidONE);
So the challenge
jobject o = env->CallObjectMethod(jTestobject, test);
returns a job representing enum STATUS, especially ONE. So how do I know which listing it returned? I tried to compare it with STATUS_ONE , but they do not match.
source share