从Java调用Mono程序集 [英] Calling Mono Assemblies from Java

查看:1200
本文介绍了从Java调用Mono程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C#编写的大型文本校对框架,我想编写一个使用此库集的OpenOffice扩展.我首选的语言是Java.因此,我需要一种从Java(在Windows和 Linux 中)访问.NET程序集的方法.有没有办法从Java调用Mono程序集?

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?

推荐答案

IKVM应该允许您做您想做的事情,但我必须承认我还没有做这件事.

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

以下是其项目的链接: http://www.ikvm.net/

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

还有一个调用.NET API的简单Java程序

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);
       }
   }
}

更多有用的信息.

这篇关于从Java调用Mono程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆