从Java访问.NET / DLL库/组件? [英] Accessing .NET/dll libraries/components from Java?

查看:125
本文介绍了从Java访问.NET / DLL库/组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有廉价或免费的网关从.NET到Java?我在看一些数据采集硬件有驱动程序的C / C ++和.NET - 我的真正的不想做.NET任何编程

Are there inexpensive or free gateways from .NET to Java? I'm looking at some data acquisition hardware which has drivers for C/C++ and .NET -- I really don't want to do any programming in .NET.

更新:我没有做什么,我本来想做的事,但我已经做了类似的事情,使用JNA封装DLL中的某些功能,以控制从Java中的USB硬件设备。 (DLL的来自设备制造商),它的工作真的很好。谢谢!

Update: I haven't done what I originally wanted to do, but I've done something similar, using JNA to encapsulate some functions from a DLL, in order to control a USB hardware device from Java. (the DLL comes from the device manufacturer) It works really nicely. Thanks!

推荐答案

您也可以尝试使用 JNA 用于访问本机库。 JNA提供了Java程序方便地访问本地共享库(在Windows上的DLL),而无需编写任何东西,但Java的code-没有JNI或本地code是必需的。如果他们的API是相当直向前的,这可能是阻力最小的路径。

You could also try to use JNA for accessing the native library. JNA provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code—no JNI or native code is required. If their API is fairly straight foward, this might be the path of least resistance.

见他们入门指南他们调用一些本地code(printf和GETSYSTEMTIME)。

See their getting started guide where they call some native code (printf and GetSystemTime).

这篇关于从Java访问.NET / DLL库/组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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