Search code examples
javajava-native-interface

How to return a list from java to JNI


Possible Duplicate:
Passing string from Java into JNI
passing string array from java to C with JNI

I need to return a list List < String > from java to jni. How should i do this and i also need to convert the returned value as an array of std::string at JNI end. Can anyone please tell me how to go about this.


Solution

  • The exchange of data bettween Java and C can by peformed using only primitive types. So by JNI is not possible. An alternative could be SWIG or JavaCpp.