JNI如何存储char数组并将其记录在jNI中?

时间:2011-09-14 14:26:38

标签: java android java-native-interface

我从java发送char []到C.我想存储我的methodid函数的返回值:

mid = (*env)->GetMethodID(env, clazz, "getReg_chal", "()[C");
char[] reg_chal = (*env)-> ? 

我将以下示例称为refrence:

jmethodID midGetName = (*env)->GetMethodID(env, employeeClass, "getAge", "()I");
    int age =  (*env)->CallIntMethod(env, employeeObject, midGetName);
    return age;

我会写什么? ...因为JCI中没有CallCharArrayMethod。

提前致谢..