It is a little bit tricky to use jni to access matrix in java from c/c++ code. Here is my example:
I really hate the blogger. I can past my source code. Anyway, you can send me email about how to do it.
Here the "tags" is a two dimensional array in java. I would like to access its data and save them to a matrix "tagPos" in c/c++;