Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

.net

ikvm

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.

like image 958
Sebastian Good Avatar asked Jul 13 '11 22:07

Sebastian Good


2 Answers

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.

like image 143
Horcrux7 Avatar answered Oct 01 '22 15:10

Horcrux7


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/

like image 2
Shahzeb Avatar answered Oct 01 '22 15:10

Shahzeb