Java是否可以通过JNI层使用预先编写的c ++ dll? [英] Can Java use a prewritten c++ dll through JNI layer?

查看:94
本文介绍了Java是否可以通过JNI层使用预先编写的c ++ dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试使用智能卡读取器来读取n个数据到智能卡.我从供应商那里得到了一个dll文件,该文件是c ++的,他们没有将其用于Java.
是否可以使用JNI层在Java中使用相同的dll?

请回复...

Hi,
I m trying to use smart card reader to read n write data to smart card. I have a dll file from the vendor which is for c++ and they have not used it for Java.
Is it possible to use the same dll for Java using JNI layer?

Please reply...

推荐答案

是.

JNI教程@ oracle.com [
Yes.

JNI Tutorial @ oracle.com[^]


是的.当然,您必须为DLL写一个JNI包装器.
Yes. Of course you have to write a JNI wrapper for the DLL.


这篇关于Java是否可以通过JNI层使用预先编写的c ++ dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆