开发者

Is there any example of compiling a java library into something wrappable with C#?

So I want to wrap a simple java library so to be开发者_如何学运维 able to use its functions from C#. Is it possible, how to do such thing?

BTW can we do such thing from C?


Have you taken a look at http://www.ikvm.net/?? It seems pretty popular and according to the site:

It is an implementation of Java for Mono and the Microsoft .NET Framework. It includes the following components:

A Java Virtual Machine implemented in .NET A .NET implementation of the Java class libraries Tools that enable Java and .NET interoperability


I find Pavel Šavara's jni4net project very useful for this. It allows you to host the JVM and the CLR in a single process and share objects between them.


There are several ways you can do this.
1) Use web services (Requires a separate process).
2) Use JNI or some other native library.
3) Use some middleware (Queueing system)

Of course either of these would allow 2-way communications

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜