How can I use a .Net assembly in Java

允我心安 提交于 2019-12-17 20:25:46

问题


I want to use a Microsoft .Net Assembly in a Java Application. Is there any way out to do that.

Any help will be appreciated.


回答1:


Java and .Net run an fundamentally different systems: the JVM and CLR respectively. It's not possible to directly load one into the other and use it. They are incompatible formats.

It is possible though to have .Net and Java components interact through a bridge layer. There are several out there which provide this behavior

  • http://www.jnbridge.com/
  • http://java-dotnet-bridge.com/

Note: Most of these solutions though are aimed at sharing well defined components as opposed to directly loading libraries. This may or may not work for you.




回答2:


Something interesting on the same topic: ikvm



来源:https://stackoverflow.com/questions/6826391/how-can-i-use-a-net-assembly-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!