Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling Mono Assemblies from Java

I have a large text proofing framework written in C# and I want to write a OpenOffice extension that uses this set of libraries. My prefered language for doing so is Java. Hence, I need a method to access .NET assemblies from Java (both in Windows and Linux). Is there a way to call Mono assemblies from Java?

like image 380
Mohammad Hedayati Avatar asked Dec 22 '25 16:12

Mohammad Hedayati


1 Answers

IKVM should allow you to do what you want but I must admit that I haven't done this myslef.

Here's a link to their project: http://www.ikvm.net/

And a simple java program that calls the .NET API

import cli.System.IO.*;

public class ShowDir{

   public static void main(String[] args){
       String[] files = Directory.GetFiles("."); //.NET System.IO
       for(String file : files){
           System.out.println(file);
       }
   }
}

More useful info.

like image 102
Icarus Avatar answered Dec 24 '25 06:12

Icarus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!