In fact, I call a c++ function :
JNIEXPORT void JNICALL Java_test_main_JniFunctions_testObject (JNIEnv *env, jobject obj, jobjectArray objArray){....}
And what I'd like to do, is get back the original object's values. Considering the java code declaration for this object :
jniFct.testObject(new Object[][]
{
{"testTable"},
{0, 0.0, "aaa"},
{1, 1.1, "bbb"},
{2, 2.2, "ccc"}
});
In exemple, get the value from the third row in the second column.
Anybody's got an idea on how to do it ??
jobject row = env->GetObjectArrayElement(objArray, 2);
jobject value = env->GetObjectArrayElement((jobjectArray)row, 1);
const char* cvalue = env->GetStringUTFChars((jstring)value, 0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With