Published 2008-01-16.
Time to read: 2 minutes.
I am building the first implementation of EmpathyWorks™ as a Java library packaged as a JAR. After looking around for a while to understand how EmpathyWorks might run on .NET, I found IKVM.NET.
IKVM Works Well
IKVM is an open source project that converts Java JARs into a .NET assembly. I was quite skeptical, but after downloading IKVM I was able to convert EmpathyWorks into an EXE that ran on Windows XP in about ten minutes.
IKVM also has a mechanism for converting .NET stubs into JARs, important when developing .NET code in an IDE so that Intellisense tooltips appear for code completion. I am next going to try converting the Microsoft Robotics Studio runtime to a JAR so I can try writing a sample MSR application that co-operates with EmpathyWorks.
There is a brief note in the IKVM documentation that says debugging from Java in this circumstance does not work. Hmm, what about the other way... can one debug the .NET application from Visual Studio, and reach right into the converted Java code? I suppose no source code would be available.
Update Jan 18/08
I built a DLL from Java using IKVM's -target:library
option.
Visual C# 2008's object browser happily showed all the public objects and methods in the DLL.
Once I discovered the “Add to References” button in the object browser my test C# program was able to call into the DLL.
Most cool!
The End of IKVM.NET
Jeroen Frijters, the principal author of IKVM.NET posted the following Apr 21/17.
I hope someone will fork IKVM.NET and continue working on it. Although, I’d appreciate it if they’d pick another name. I’ve gotten so much criticism for the name over the years, that I’d like to hang on to it 😊
I’d like to thank the following people for helping me make this journey or making the journey so much fun: Brian Goetz, Chris Brumme, Chris Laffra, Dawid Weiss, Erik Meijer, Jb Evain, John Rose, Mads Torgersen, Mark Reinhold, Volker Berlin, Wayne Kovsky, The GNU Classpath Community, The Mono Community.
And I want to especially thank my friend Miguel de Icaza for his guidance, support, inspiration and tireless efforts to promote IKVM.
Thank you all and goodbye.