JNI Function to call List
843829Dec 24 2008 — edited Dec 31 2008Hi,
I'm new to JNI programming. I need to make a JNI function that takes 3 lists as parameters and within the function these lists are converted to some C++ datatype (char * or vector or whatever). Also this function will return some list. This is like the following.
JNIEXPORT JList JNICALL Java_function_ListManipulation
(JNIEnv *env, jobject obj, JList list1, JList list2, JList list3)
{
const char * st1 = (*env).<some conv_function>(list1, 0);
const char * st2 = (*env).<some conv_function>(list2, 0);
const char * st3 = (*env).<some conv_function>(list3, 0);
//Do something with st1, st2, st3
env->ReleaseStringUTFChars(prompt, nativeString);//May not be ReleaseStringUTFChars; May be some other function
}
Can any one help me in this?