JNI调用.NET dll [英] JNI to call .NET dll

查看:75
本文介绍了JNI调用.NET dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个Java应用程序,该应用程序将通过中间Visula C ++ dll调用C#dll,当我尝试从cmd提示符或Eclipse IDE运行.class文件时,一切都很好,但问题是为了是否需要将C#dll与Java.exe放在同一目录中,否则本机调用会发生异常,从而使得无法构建Java Project,以及如何实现此想法

I am trying to create a Java Application that will call C# dll through an intermediate Visula C++ dll, its all well and good when I try to run the .class file from cmd prompt or Eclipse IDE but the problem is in order to do it I need to place the C# dll in the same directory as the Java.exe or else there occurs an exception the the native call, thus making to impossible to build the Java Project, any idea as to how this can be done

推荐答案

您可以使用COM Interop启用并注册托管(.NET)dll。
请参阅此链接: http://support.microsoft.com/kb/828736

You can enable and register your managed (.NET) dll with COM Interop. See this link: http://support.microsoft.com/kb/828736

这篇关于JNI调用.NET dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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