Passing a byte[] in Java to a function in C through JNI: how to use jarraybyte

前端 未结 2 699
说谎
说谎 2020-12-13 13:50

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

2条回答
  •  一整个雨季
    2020-12-13 14:22

    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

提交回复
热议问题