Saturday, November 13, 2010

IKVM.NET a JVM CLR bridge

While reading through the Mono web pages, I came across an interesting project known as IKVM.NET.
This project strives to bridge the gap between the Java and the .NET world, by providing a JVM written over the .NET framework. What this essentially means is that now there is a way to easily convert a Java library into a .NET library and vice versa.


It is also possible to develop a .NET application in Java and a Java application in .NET.


Many may question the rationale behind such a framework. Earlier even I too was skeptical about this framework. But as I am involved with some projects, I realize that this framework strives to solve a dilemma that many developers faced earlier - how to use the facilities of a mature framework available on platform into the other. 


For example; today there does not seem to be a platform independent way to read MS Word documents in .NET. You have to necessarily use COM interfaces exposed in the Microsoft Office PIA. This will work fine on Windows, but with the advent of Mono, .NET apps are no longer restricted to Windows platforms.. So now I wanted to port this code to Mono on my Mac OS but could not do so as this code uses COM which is Microsoft specific technology.


I found that I could use the Apache POI to read word documents in Java in a platform independent manner and that the POI framework is pretty mature. Now using IKVM I can convert this POI library into a .NET dll and consume the classes.


I am working on this now and will blog about my experiences in another post.



No comments:

Post a Comment