如何在Java中使用.Net程序集 [英] How can I use a .Net assembly in Java

查看:357
本文介绍了如何在Java中使用.Net程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Java应用程序中使用Microsoft .Net程序集。有没有办法做到这一点。

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

任何帮助将不胜感激。

推荐答案

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.

这篇关于如何在Java中使用.Net程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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