且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Java中使用.Net程序集

更新时间:2023-02-10 08:22:19

Java和.Net运行一个根本不同的系统:JVM和CLR。不能直接将一个加载到另一个并使用它。它们是不兼容的格式。

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.

虽然有.Net和Java组件可以通过桥接层进行交互。有几个提供这种行为

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.