I've seen some questions on how to properly pass a C array into Java using JNI, but I have the reverse problem: How do I properly call an int array getter method in C using JNI. Specifically, I want to pass a BufferedImage instance into C and call the "public int[] getRGB()" method on this BufferedImage instance.
My understanding is that all arrays are objects in Java, so I presume that I should be calling: (*env)->CallObjectMethod() in order to get this array, but when I try this, my JVM crashes. Any suggestions?