JNI: How can i check if jobject is a null object in native c code
A:
Since the objects in Java and C code actually use the same memory locations (the object passed to the native code is the same memory reference in both worlds), a simple
if (someJObject == NULL) {}
in the C code should be just fine I guess. I haven't tested it though :-)
David Sauter
2010-03-02 15:46:03