JNI and multidimensional arrays
Hi
the last days i spent searching information on how to process larger multidimensional primitive arrays ([5][300][300]) with JNI but i failed to find stringent proof for it is possible or not. Maybe somebody her can help:
i want to pass a 3D array of ints to a c-function and do excessive manipulation there, then pass the array back. Possible? where can i find sources on that?
Thanks for any help
Shin
Yes.. this is quite possible. To take your example, you would access foo[1][2][3] like this:jojbectArray middleArray = static_cast<jobjectArray>( env->GetObectArrayElement( fooArray, 1 ) );
jintArray endArray = static_cast<jobjectArray>( env->GetObjectArrayElement( middleArray, 2 ) );
int element = env->GetIntArrayElement( endArray, 3 );
God bless,
-Toby Reyelts
Check out the free, open-source JNI toolkit, Jace - http://jace.reyelts.com/jace
Mandarin?God bless,-Toby ReyeltsCheck out the free, open-source JNI toolkit, Jace - http://jace.reyelts.com/jace