This is the first time that I use the JNI and also the first time that I have to write some lines in C.
What I am trying to do is very simple. I\'m just trying to sw
qrtt has given you a great answer.
However, the JNI has very comprehensive and (relatively) easy-to-understand documentation that you should read front-to-back if you will be using JNI features again in the future. You can find it here: http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html
For your particular case, here's the section on dealing with arrays: http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/design.html#wp1265