作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2006, Vol. 32 ›› Issue (9): 86-87,90.

• 软件技术与数据库 • 上一篇    下一篇

两种重用本地代码库的方法比较

陈 宇,徐开勇,李立新,王惠芳   

  1. 信息工程大学电子技术学院研究所,郑州 450003
  • 出版日期:2006-05-05 发布日期:2006-05-05

Comparison of Two Ways of Reuse Native Code Library

CHEN Yu, XU Kaiyong, LI Lixin, WANG Huifang   

  1. Research Center of Electronic Technology College, Information Engineering University, Zhengzhou 450003
  • Online:2006-05-05 Published:2006-05-05

摘要: 通过分析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