简体   繁体   English

将Jar嵌入C#表单

[英]Embedding a Jar into a C# Form

Ok this situation is a bit difficult. 好的,这种情况有点困难。 But I am trying to embed a Java Jar into a C# form. 但是我试图将Java Jar嵌入到C#表单中。 Not as a new window or new process. 不作为新窗口或新过程。

The Jar will be a game that uses the LWJGL library. Jar将是使用LWJGL库的游戏。

The C# Form will be a "wrapper" for it with tools and more. C#表单将成为带有工具等的“包装器”。

Anyone have any ideas? 有人有想法么? Is this even possible? 这有可能吗?

According to the IKVM Home Page 根据IKVM主页

IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. IKVM.NET是Java for Mono和Microsoft .NET Framework的实现。 It includes the following components: 它包括以下组件:

A Java Virtual Machine implemented in .NET A .NET implementation of the Java class libraries Tools that enable Java and .NET interoperability .NET中实现的Java虚拟机Java类库的.NET实现实现Java和.NET互操作性的工具

One would approach it from using a DLL not a jar. 可以通过使用DLL而不是jar来实现。 Also this sounds like a bit of a security issue. 同样,这听起来像是一个安全问题。

They're completely different runtimes; 它们是完全不同的运行时。 you'll need a process for both the CLR and the JVM; 您将同时需要CLR和JVM的过程; no way around that. 没办法解决。

You can try the Java to C# converter provided by MS, and then rebuild: http://www.microsoft.com/downloads/details.aspx?FamilyID=46bea47e-d47f-4349-9b4f-904b0a973174&displaylang=en 您可以尝试MS提供的Java到C#转换器,然后重新构建: http : //www.microsoft.com/downloads/details.aspx? FamilyID = 46bea47e-d47f-4349-9b4f-904b0a973174&displaylang= en

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM