Running Java on NET/Mono: Jeroens Frijters Discusses IKVM.NET

| by Jeff Martin Follow 17 Followers on May 08, 2012. Estimated reading time: 1 minute |


IKVM.NET (IKVM) is a JVM for the .NET and Mono platforms which allows users to execute Java applications directly. Microsoft's Erik Meijer recently sat down with IKVM creator Jeroen Frijters to discuss several different aspects of the project. The interview is wide-ranging, from discussing the internals of IKVM to the project's goals for the future. Here are some highlights:

Frijters has worked on the project as primary developer since its inception in 2002. The interview begins with Frijters discussing how IKVM is part of the Mono project, enabling a mutually beneficial relationship where the two projects can contribute patches to each other. Architecturally, IKVM has fully implemented the Java memory model on .NET. Frijters tries to avoid wrappers, which necessitates the need for some special case code to correctly handle Java's string interfaces.

.NET developers can use custom attributes in Java code if this code will be run on IKVM. Both platforms (Java and .NET) can use attributes both ways if the code is run on IKVM. So one can use .NET custom attributes in Java code and one can also use Java annotations on C# classes and members.

Under the hood, IKVM's runtime and compiler are written primarily in C#. Frijters is able to take the publicly available Java code (which at various points has been from GNU Classpath, OpenJDK, and others) and replaces the native C code therein with managed code. Unless a user utilizes native code in their application, a Java application paired with IKVM is fully portable as IKVM does not use any native code.

At this time IKVM has full support for Java 7, including support for the new instruction invoke dynamic. However, Frijters admits that there is still much to be done to increase the performance of newer instructions.


Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

great tool by Nicholas Whitehead

I love this product. It really simplifies integrating java with .Net allowing one to jettison other more complex and large footprint solutions like soap.

Kudos to Jeroen !

Re: great tool by Andrew McVeigh

> Kudos to Jeroen !

Yes! IKVM is absolutely amazing. Its used in complex production tested libraries like Saxonica.Net that I've found to be excellent.

I've personally tested it on a large and very fiddly Swing + Java2D application I wrote for my phd, with a very complex computation layer. On the first pass it produced a workable version that ran on the CLR with a similar level of performance to the Java version. Had a few swing nigglies, but nothing serious. Absolutely amazing.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss