开发者

Is there a IKVM for Java? Can I run .NET assemblies on a JVM?

IKVM is an amazing beast that lets me execute Java jars in a .NET envi开发者_运维问答ronment. 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.


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.


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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜