Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Run Java 8 Code on .NET with IKVM

Run Java 8 Code on .NET with IKVM

Leia em Português


IKVM is a JVM built on top of the CLR that is working towards full compatibility. It runs on both .NET and Mono and, as of this release candidate, supports Java through version 8. For class libraries, it uses OpenJDK 8.

IKVM offers two modes. In dynamic mode, it runs Java applications directly just like any other virtual machine. In static mode, Java byte code is recompiled into .NET libraries and executables.

When working with Java code that is intended for running on IKVM, you can import .NET classes by prefixing the namespace with “cli.”. In order to satisfy the Java compiler, this requires generating the appropriate Java stubs using the ikvmstub utility.

Rate this Article


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.

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

Community comments

  • IKVM rocks

    by Robert Sullivan,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I was initially skeptical about the idea IKVM, preferring traditional routes for the Microsoft world to communicate with Java communication like JNI, CORBA (I know, yikes!), COM / SOAP Web Service, MQ Series, Facebook's Thrift (now Apache) etc but have been very impressed with IKVM. We use the static mode to compile an open-source Java library and thus our .NET apps are using largely the same code as our Java apps .. in production. And it can run the Minecraft client ;)

  • who cares? and WHY?

    by Cuenta DePrueba,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    From the start .Net started as a Microsoft way to steal mind share and market share from Java. Then came "mono" the always almost-compatible so-called "open" implementation always playing catch up with the Microsoft code.

    Nowadays, who cares about .Net? Only Microsoft shills and Microsoft-only shops. The World has embraced open source Java. OpenJDK is the reference implementation and OpenJDK comes with almost every Linux distro. Plus, Oracle JDK is built on the same source base as OpenJDK (without the plug-in).

    IBM, RedHat, AMD, Intel, SAP, Apple have all joined OpenJDK.

    open source .Net? Too little, too late.

  • Re: who cares? and WHY?

    by Mohamed El-Beltagy,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Microsoft has opened sourced the CoreCLR today and made it available online @ github with an intent to make it available for different OS's.

    More details are here:

    Note: I'm a Java developer.

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

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