在java中使用C#dll [英] Using C# dll in java
问题描述
您可以使用C#由 Robert Giesecke 编写的项目模板。这允许您在C#DLL中创建本机C风格的API导出,并从Java或几乎任何其他语言中调用它们。向下滚动到非托管导出库文件的页面底部。
或者,您可以使用 ComVisible
创建一个COM类,并从Java访问。
Im trying to use external .dll file coding in c# ,in my Java application , what I know about the dll that it contains interfaces with functions we can use ,I can load the dll to my java application , but how i can use the interfaces within it ? I dont know how JNI can help in this case .Please help .
You can create native exports from your C# DLL using a project template written by Robert Giesecke. This allows you to create native C-style API exports in your C# DLL, and call them from Java or almost any other language. Scroll down to the bottom of the page for the Unmanaged Export Library file.
Alternatively, you could use ComVisible
to create a COM class and access it from Java.
这篇关于在java中使用C#dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!