title: Convert jobject to Integer in JNI C++ and parse the intValue
body: <p>I have following code which accepts int value at JAVA level</p>
  
  <pre><code>dataObj.property(20);
  </code></pre>
  
  <p>This is the definition of property function</p>
  
  <pre><code>void property(Object value){
       // JNI called
  }
  </code></pre>
  
  <p>JNI function definition</p>
  
  <pre><code>Java_com_XXX_XXXX_JNIProperty(JNIEnv *a_pEnv, jclass, **jobject a_oPropertyValue**) {
     // how to convert jobject to Integer object and then get the intValue
     jclass cls = a_pEnv-&gt;FindClass("java/lang/Integer"); 
     jmethodID getVal = a_pEnv-&gt;GetMethodID(cls, "intValue", "()I");
     int i = a_pEnv-&gt;CallIntMethod(value, getVal);
  }
  </code></pre>
  
  <p>How to convert jobject which was of type <strong>Object</strong> in Java to Integer object in JNI and parse int value ?</p>