tags:

views:

80

answers:

2

Is IKVM.NET a good way to use Java Code or Java Libs in .NET applications?

Has anybody experiences with this tool? Are there alternatives? Are there possibilities to call Java functions/code in COM-based applications like Visual Basic 6 or Classical ASP?

+2  A: 

I've used this tool and especially the compiler to convert a JAR file to .NET assembly. It was for the xhtmlrenderer project which allows to convert an XHTML file to PDF and is based on iText which is not a small code base. The conversion went fine and I am using it in production without any flaws.

Darin Dimitrov
+1  A: 

I've just started using this tool and it is quite amazing how it integrates .Net and Java. I was using it to convert a library that was only available in java to a .net assembly.

The good:

  • Extremely easy to use
  • Small footprint(the assemblies are not that big, and you don't need all of them all of the time)
  • Project seems to be well maintained and the sourceforge feedback seems good

The bad:

  • Debugging is a little more difficult. The Visual Studio exception handler looks for a message property that is blank in java. The result is that you have to make temporary try...catch block and put a watch on the exception object to inspect the details of the java exception
  • classpath resources can be difficult to load and work with.
  • Javadoc strings are not converted through so don't expect to see tips with intellisense, you will have to read through javadoc html to get help.

Overall it's been a pleasant experience, but I have admittedly only been using it for 2 days now.

Tjaart