在C#应用程序中运行Java(.jar)应用程序 [英] Running a Java (.jar) app inside a C# app

查看:784
本文介绍了在C#应用程序中运行Java(.jar)应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

在C#中使用.jar java库API?

我有一个我希望在C#应用程序中运行的jar文件,无论如何都要这样做吗?

I have a jar file I want to run in a C# application, is there anyway to do this?

推荐答案

您可以使用 ikvmc.exe 编译器从此<生成.NET程序集code> .jar :

You could use the ikvmc.exe compiler to generate a .NET assembly from this .jar:

ikvmc.exe -target:library -out:Foo.dll Foo.jar

这将生成 Foo.dll 。从现在开始,您知道如何处理托管的 Foo.dll 程序集。

This will generate Foo.dll. From now on you know what to do with the managed Foo.dll assembly.

这篇关于在C#应用程序中运行Java(.jar)应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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