摘要: 通过分析JNI 技术利用本地代码库的常见方法,提出了一种不需修改原始代码,完全封装现有本地代码库的方法,并给出了在32位Windows 平台上的实现实例。最后对两种方法的优缺点进行了分析和比较。
关键词:
Java;Java 本地接口;本地代码;动态链接库
Abstract: This paper analyses an ordinary way of reuse native code library through JNI, and puts forward a new way to do this work. This new way avoid code translation and can encapsulation the old library entirely. This paper also presents a realization of this way on 32bits Windows and gives out the comparison of the two ways.
Key words:
Java; Java native interface (JNI); Native code; DLL
陈 宇,徐开勇,李立新,王惠芳. 两种重用本地代码库的方法比较[J]. 计算机工程, 2006, 32(9): 86-87,90.
CHEN Yu, XU Kaiyong, LI Lixin, WANG Huifang. Comparison of Two Ways of Reuse Native Code Library[J]. Computer Engineering, 2006, 32(9): 86-87,90.