I'm using JNI to pass an image from C++ to Java, im trying to send the bytes in a jbyteArray over to Java in byte[]. However I'm getting an error which has most likely have to do something with the size of the bytes being send.
I have tried int len = dwBmpSize
which have the same value but the jvm keeps crashing.
What is the correct amount of bytes to initialize the jbyteArray with?