convertir un vecteur en jobject en C ++ / JNI?
Je suis à l'aide de Java natif de la fonction
public native ArrayList<String> parseXML();
En C++ ma fonction native -
vector<string> resultList;
JNIEXPORT jobject JNICALL Java_Sample1_parseXML
(JNIEnv *env, jobject obj){
//logic
return resultList; //here getting error
}
Mon problème est que la façon de convertir resultList (type de vecteur) à jobject type?
source d'informationauteur anirudha mundada | 2011-10-15
Vous devez vous connecter pour publier un commentaire.
Vous devez créer un wrapper pour la liste de tableaux en C++. Quelque chose comme:
pour plus d'informations voir:
http://download.oracle.com/javase/1.4.2/docs/guide/jni/spec/functions.html
La méthode est la suivante:
Si la signature est:
Plus: http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/types.html#wp276