title: Java JNI GetMethodID return NULL
body: <p>I have this class in Java:</p>
  
  <pre><code>public class CameraActivity extends Activity {
  
    ...      
  
    public class RecognitionResult {
      public String text;
      public int x;
      public int y;
      public int width;
      public int height;
  
      public RecognitionResult(String text, int x, int y, int width, int height) {
        this.text = text;
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
      }
    }
  }
  </code></pre>
  
  <p>And this is my JNI code:</p>
  
  <pre><code>extern "C"
  jobject Java_com_example_parkingcontrolsystem_CameraActivity_recognizeNumberPlate(JNIEnv *env,
                                                                                    jobject object,
                                                                                    jstring filename)
  {
    jclass cls = env-&gt;FindClass("com/example/parkingcontrolsystem/CameraActivity$RecognitionResult");
    std::cout &lt;&lt; "Class: " &lt;&lt; cls &lt;&lt; std::endl;
  
    jmethodID constructor = env-&gt;GetMethodID(cls, "&lt;init&gt;", "(Ljava/lang/String;IIII)V");
    std::cout &lt;&lt; "Method: " &lt;&lt; constructor &lt;&lt; std::endl;
  
    recognition_result = env-&gt;NewObject(cls, constructor, "Hello from JNI", 0, 0, 50, 100);
    std::cout &lt;&lt; "Object: " &lt;&lt; recognition_result &lt;&lt; std::endl;
  
    return recognition_result;
  }
  </code></pre>
  
  <p>FindClass returns not a NULL, OK. But GetMethodID always returns zero. I tried to make the default constructor without args, and than use the "()V" signature, but GetMethodID returns NULL.</p>
  
  <p>What is wrong?</p>