Is there a IKVM for Java? Can I run .NET assemblie

2020-08-09 08:08发布

IKVM is an amazing beast that lets me execute Java jars in a .NET environment. That is, it's a JVM written on the .NET runtime (CLR).

Does the opposite exist? Has someone written a CLR on top of a JVM? With suitable translation and base class library implementation, we might find .NET code executes more quickly in an aggressive JIT compiler, like HotSpot, than in the CLR JIT.

标签: java .net ikvm
2条回答
地球回转人心会变
2楼-- · 2020-08-09 08:19

The most Java programs run with IKVM (32 bit) a little faster as with Java SE. My test show 5-10% faster. That I think that MSIL code would be run slower with a HotSpot JIT.

The next problem is that MSIL has many more features as Java byte code. It can be difficult to emulate it and it consume performance.

With Mainsoft Grasshopper you have a solution that work on a Java EE server. I does not know a solution for a desktop GUI.

查看更多
做个烂人
3楼-- · 2020-08-09 08:22

You can call COM or ActiveX componenets usuing JACOB (Java COM Bridge) . That what I used only time I had to call my C# code from JAVA . Also check this link from StackOverflow How can I call .NET code from Java? Also googled this http://michaelkimsal.com/blog/running-net-code-on-a-jvm/

查看更多
登录 后发表回答