IKVM
Implementation of Java for Common Language Infrastructure implementations
IKVM (formerly IKVM.NET) is an implementation of Java for Common Language Infrastructure implementations such as Mono and the .NET framework. IKVM is free and open-source software, distributed under the zlib permissive software license.
Work began on IKVM in early 2000 to assist migration of a Java-based reporting package from Sumatra to the Microsoft .NET Framework. The original developer, Jeroen Frijters, discontinued work on IKVM in 2015. In 2018, Windward Studios forked IKVM.NET to continue development on the open-sourced IKVM. In 2022 Jerome Haltom and others picked up the work on a new GitHub organization and finished .NET Core support.
01Components
IKVM includes these components:
- A Java virtual machine (JVM) implemented in .NET
- A .NET implementation of the Java class libraries
- A tool that translates JVM bytecode (JAR files) to .NET IL (dynamic-link library (DLL) or Portable Executable (EXE) files).
- Tools that enable Java and .NET interoperability
IKVM can run compiled Java code (bytecode) directly on .NET or Mono. The bytecode is converted on the fly to Common Intermediate Language (CIL) and executed.
By contrast, J# is a Java syntax on a .NET framework, whereas IKVM is effectively a Java framework running on a .NET framework.
Jeroen Frijters was the main contributor to IKVM. He is Technical Director of Sumatra Software, based in the Netherlands.
02Name
The IKVM part of the name is a play on JVM in which the author "just took the two letters adjacent to the J".
03Status
IKVM 8 implements Java 8.
The IKVM organization also maintains IKVM.Maven.Sdk, an extension to the .NET PackageReference system that allows direct references to and transpiling of Maven artifacts. IKVM.Maven.Sdk is also available on NuGet.org.
04Example
The following is a .NET application written in Java, which prints the list of files in the current directory.
In IKVM, the System.* namespace in .NET is written as cli.System.*.
package org.wikipedia.examples; import cli.System.IO.*; public class Example { public static void main(String[] args) { String[] files = Directory.GetFiles("."); for (String file : files) { System.out.println(file); } } }Sources and credits
This article is adapted from the Wikipedia article “IKVM”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.