Pages

Showing posts with label ikvm. Show all posts
Showing posts with label ikvm. Show all posts

July 29, 2008

Bringing Java to the .NET world

I was killing some time the other day when I stumbled across a pretty interesting open source project named ikvm. With ikvm, you can take Java byte code and convert it into the .NET CIL (.NET code all compiles down to CIL. Yes, Microsoft stole the idea from Java, haha). This means that all of the nice open source Java libraries we use can be converted by ikvm and used in .NET applications.

ikvm is fairly simple to use as well.

You want to convert an executable jar to a Windows application?
ikvmc -target:exe application.jar

Output: application.exe, a Windows console app
Note: GUI applications should use 'winexe' for the target.

You want to convert a library? Easy.
ikvmc -target:library awesomeLibrary.jar

Output: awesomeLibrary.dll


You can even use ikvm to run Java programs as it is basically a .NET implementation of the JVM.

I found all this pretty amazing since there are products on the market right now that charge in the thousands of dollars to do what this project does for free. I tell you, this new age of open source development is kicking ass!! This project brought us that much closer to having .NET and Java code coexisting and playing nice with each other.