title: JNI GetFieldID returning null for inner class
body: <p>I have public inner class which i want to access in JNI. GetFieldID is returning null while accessing fieldId for inner class</p>
  
  <p>Below is code </p>
  
  <pre><code>public class classA{
      public class classB{
      public int b1;
      }
     public int a1;
     public classB B;
  }
  </code></pre>
  
  <p>Note : When i ran javap -s on class file i got following output </p>
  
  <pre><code>public class level1.level2.level3.classA{
  public int a1;
      descriptor : I
  public level1.level2.level3.classA$classB B;
      descriptor : Llevel1/level2/level3/classA$classB;
  </code></pre>
  
  <p>Here is class to call native function.</p>
  
  <pre><code>public class extraclass{
      private native int myfunction1(classA A);
      public int extrafunction(classA A){
          myfunction1(A);
      }
  }
  </code></pre>
  
  <p>Native code</p>
  
  <pre><code>JNIEXPORT jint JNICALL myfunction1( JNIEnv *env, jobject obj ,jobject A)
  {
      jclass cls = (*env)-&gt;GetObjectClass( env, A);
      jfieldID ja1,jB;
      int a1;
  
      ja1 = (*env)-&gt;GetFieldID( env, cls, "a1","I" );
      a1  = (*env)-&gt;GetIntField(env, config, ja1); // This works good.
  
      jB = (*env)-&gt;GetFieldID( env, cls, "B","Llevel1/level2/level3/classA$classB;" ); 
      // &lt;&lt;&lt; Its crashing here with "JNI DETECTED ERROR IN APPLICATION: JNI GetFieldID called with pending exception 'java.lang.NoSuchFieldError'"
  
  }
  </code></pre>
  
  <p>I tried following option too but failed</p>
  
  <pre><code>jB = (*env)-&gt;GetFieldID( env, cls, "B","LclassA$classB;" );  
  </code></pre>
  
  <p>Can some one suggest how to get field id of classB and access b1.   </p>