IKVM.NET
 
   

Uses for IKVM.NET

IKVM.NET is useful for several different software development scenarios. Here is a sampling of some of the possibilities.

Drop-in JVM

The ikvm application included with the distribution is a .NET implementation of a Java Virtual Machine. In many cases, you can use it as a drop-in replacement for java. For example, instead of typing

java -jar myapp.jar

to run an application, you can type

ikvm -jar myapp.jar

Use Java libraries in your .NET applications

IKVM.NET includes ikvmc, a Java bytecode to .NET IL translator. If you have a Java library that you would like to use in a .NET application, run ikvmc -target:library mylib.jar to create mylib.dll.

For example, the Apache FOP project is an open source XSL-FO processor written in Java that is widely used to generate PDF documents from XML source. With IKVM.NET technology, Apache FOP can be used by any .NET application.

Develop .NET applications in Java

IKVM provides a way for you to develop .NET applications in Java. Although IKVM.NET does not include a Java compiler for .NET, you can use the open source Jikes compiler to compile Java source code to JVM bytecode, then use ikvmc -target:exe myapp.jar to produce a .NET executable. You can even use .NET API's in your Java code using the included ikvmstub application.