Use JNI instead of JNA to call native code?

后端 未结 10 2089
滥情空心
滥情空心 2020-11-28 18:42

JNA seems a fair bit easier to use to call native code compared to JNI. In what cases would you use JNI over JNA?

10条回答
  •  情歌与酒
    2020-11-28 19:11

    By the way, in one of our projects, we kept a very small JNI foot print. We used protocol buffers for representing our domain objects and thus had only one native function to bridge Java and C (then of course that C function would call a bunch of other functions).

提交回复
热议问题