java.net-coreikvm

Calling Java components from dot net core


I have a java component in the form of a .jar file that is running via a stand-alone executable in a dot net framework app. The .jar file is a third party component, and rewriting it is not an option - it is maintained, and I want the ability to update the component as needed. That would be too hard if I had to convert this to c#.

It's worked solidly for a couple of years, but it is one of the last applications I have in the old dot net framework. I want to get rid of dot net framework altogether, and move to using dot net core for executing the jar file, or more specifically .NET 5 (or above)

I was using a free component IKVM from Windward Studios to do this. Some work was done to upgrade that for dot net core, but the project doesn't look like it's been continued.

I'm thinking, surely someone has a need to run java components from within dot net core! Is there some more standard way of doing this now?

How do I go about achieving that?


Solution

  • IKVM now supports .NET Core and .NET.

    https://github.com/ikvm-revived/ikvm/

    https://www.nuget.org/packages/IKVM