I am trying to write a benchmark for different sorting algorithms in java, for that I wanted to explore the world of JNI. I am trying to sort a set of int arrays which are contained in an array. This is my Java header:
public static native void sort(int[][] c);
I used javah to generate this C header for it:
JNIEXPORT void JNICALL Java_org_jku_ssw_prsw2_ue6_jni_JNISorter_sort (JNIEnv *env, jclass cls, jobjectArray objArr)
Then I try to get the length of the array with
jsize len = (*env)->GetArrayLength(env, objArr);
but from here I'm kinda stuck, I can get a jobject element from this array using GetObjectArrayElement but how do I procceed from there to get a jint array which I can then finally sort?