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.