Quantcast
Channel: Redino blog
Viewing all articles
Browse latest Browse all 80

IKVM.NET Convert JAR to .NET (C#, VB.NET) DLL

$
0
0

Why Convert JAR to .NET DLL

Imagine your company builds an online file converter, and its backend programming language is Java because of its position in web development. And in this project you build a file parsing library (jar format certainly) which is used to parse different types of files.

After this project is done, your boss decides to create a Windows desktop version for this software. Now the best choice is .NET, but how can you reuse your java parsing library? That’s why IKVM.NET existed.

IKVM.NET Introduction

IKVM.NET is a .NET implementation of Java which allows us to run Java code in .NET (C#, VB.NET, etc.) easily. It includes following three components:

  • JVM in .NET (which means you can run java byte code in .NET)
  • Java class library implementation
  • A compiler converting java byte code to .NET IL

There are many famous Java projects converted to .NET using IKVM.NET already, such as Tika, Curator, etc. Even Mono has include it as a built-in component.

Start Converting

ikvmc libpst.jar -target:library

This will generate a DLL file named libpst.dll from libpst.jar in current directory.

Without -target:library option, it will generate an exe file.

 

The post IKVM.NET Convert JAR to .NET (C#, VB.NET) DLL appeared first on Redino blog.


Viewing all articles
Browse latest Browse all 80

Trending Articles