GetMethodID for "getName" is returning NULL <p>I have been trying to print out the class name from a jclass object.</p> <p><code>jmethodID mid_getName = env-&gt;GetMethodID(point_class, "getName", "()Ljava/lang/String;");</code></p> <p>The <code>point_class</code> object is not NULL.</p> <p>I used this snippet from <a href="http://stackoverflow.com/questions/12719766/can-i-know-the-name-of-the-class-that-calls-a-jni-c-method">Can I know the name of the class that calls a JNI C method?</a> and <a href="http://stackoverflow.com/questions/9265457/class-name-from-jclass-in-jni">Class name from jclass in JNI</a></p> <p>On another note, I am doing JNI programming for android and my <code>FindClass</code> method is returning NULL when I want to create Java object on the native side. No proguard issue or anything else.</p> <p>Code:</p> <pre><code>JNIEXPORT void JNICALL long_JNI_method_name (JNIEnv * env, jobject object, jlong image, jint screenHeight, jint screenWidth) { jclass point_class = env-&gt;GetObjectClass(object); jmethodID mid_getName = env-&gt;GetMethodID(point_class, "getName", "()Ljava/lang/String;"); ... </code></pre> <p>I changed the JNI method name as it had package name(where I work) in it.</p>