问题
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