title: how to convert jobject to jstring
body: <p>I am trying to get a string in return to a function call from cpp to java. </p>
  
  <p>This is my JNI call</p>
  
  <pre><code> string GetIDJni()
  {
      cocos2d::JniMethodInfo methodInfo;
      if (! JniHelper::getStaticMethodInfo(methodInfo, CLASS_NAME, "GetID", "()Ljava/lang/String"))
      {
          return "";
      }
  
      jobject retObj = methodInfo.env-&gt;CallStaticObjectMethod(methodInfo.classID, methodInfo.methodID);
      jstring retStr = (jstring)retObj;
      methodInfo.env-&gt;DeleteLocalRef(methodInfo.classID);
      return (JniHelper::jstring2string(retStr));        
  }
  </code></pre>
  
  <p>On compiling i get the error </p>
  
  <blockquote>
    <p>error: invalid conversion from '_jobject*' to '_jstring*'</p>
  </blockquote>
  
  <p>Can anyone please tell me how to solve this problem.</p>