Frequently Asked Questions

What is IKVM.NET?

IKVM.NET is a JVM for Mono and the Microsoft .NET framework.

What do you mean by JVM for .NET?

The goal of IKVM.NET is two-fold:

  • To be able to run any Java existing application ("dynamic mode").
  • To be able to statically compile Java libraries into .NET assemblies ("static mode"). Note that you can also statically compile Java applications, but if the application depends on the exact Java class loading semantics, it might need to be adapted. Dynamic mode supports the full Java class loader model, but in static mode there are necessarily some limitations. A mixed model is also possible, for example, statically compiled code can instantiate a class loader and use it to dynamically load classes.

IKVM.NET consists of several parts:

  • IKVM.Runtime.dll: The VM runtime and all supporting code. It contains (among other things):
    - Byte Code JIT compiler/verifier: Just-in-time compiles Java Byte Code to CIL.
    - Object model remapping infrastructure: Makes System.Object, System.String and System.Exception appear to Java code as java.lang.Object, java.lang.String and java.lang.Throwable.
    - Managed .NET re-implementations of the native methods in Classpath.
  • IKVM.GNU.Classpath.dll: compiled version of GNU Classpath, the Free Software Foundation's implementation of the Java class libraries, plus some additional IKVM.NET specific code. Note that GNU Classpath isn't part of IKVM.NET, but it is used by IKVM.NET
  • ikvm-native.dll: Small unmanaged C library that is used by the JNI interface. This is an optional part, and on Windows it is only required when an application uses it's own native libraries. When running on Mono, this library is also used by the NIO memory mapped files implementation. This library ships as part of the Mono distribution and has been designed not to require any changes between IKVM versions, so if you download or compile a new version of IKVM, you don't necessarily need to update this native library.
  • ikvm.exe: Starter executable, comparable to java.exe ("dynamic mode").
  • ikvmc.exe: Static compiler. Used to compile Java classes and jars into a .NET assembly ("static mode") .
  • ikvmstub.exe: A tool that generates stub class files from a .NET assembly, so that Java code can be compiled against .NET code. IKVM.NET understands the stubs and replaces the references to the stubs by references to the actual .NET types.
  • IKVM.AWT.WinForms.dll: Very limited and broken implementation of a few AWT peers. This is a low priority issue for me.

Why this project?

There are several answers to this. First of all, it's a fun thing to work on. Second, it just seems obvious that something like this should exist. Third, I want to migrate some of my Java code to .NET and J# and JUMP just aren't good enough.

What's the relation between Mono and this project?

IKVM.NET and Mono are separate projects, but the IKVM.NET binaries are shipped as part of Mono.

How compatible is it?

The goal is to (almost) fully implement the JVM spec and to be compatible with Sun's JDK reference implementation and to provide performance comparable to the HotSpot Client VM.

Where can I get it?

The official stable release is available from the SourceForge project download page. I also post development snapshots on this blog.