资讯

最近在公司里做了一个手机的项目,需要JAVA程序在发送短信的时候和第三方的短信服务器连接。短信接口是用C++写的。琢磨了三天,大致搞懂了JNI的主体部分。先将心得整理,希望各位朋友少走弯路。 首先引用一篇文章,介绍一个简单的JNI的调用的过程。
I would like to have some JNI code malloc a block of memory and pass it back to my Java code (in the form of a jlong), so that future calls to other JNI functions can pass this pointer along for the ...