C # - interoperability between Java

Can you give me some pointers on how C # code and Java code interact? Let us define the interaction as something simple: to allow (from Java code) the instant and call of the class method defined in C #, and possibly vice versa.

Is this possible initially? (i.e. without any proxy / skeleton interface mechanism)

And finally, what proxy mechanisms can be used? (i.e. supported by language areas)

+3
java c # interop
source share
6 answers

I used IKVM to execute this successfully.

+6
source share

I found a very promising article on CodeProject here .

Excerpt from the introduction of the article:

The proposed solution will show how the two frameworks can live together in the same process and communicate seamlessly with each other.

This article describes a high-performance interoperability solution between the Java platform and the .NET Framework. The proposed solution does not replace the Java Virtual Machine or the .NET Framework runtime; instead, your JVM or .NET each is hosted in opposition to the runtime, ensuring that the VM Optimization for the provider is preserved.

+1
source share

I don’t know what should be done on the .NET side (I am not a member of .NET), but Java provides a JNI framework for interacting with native libraries.

Start with Wikipedia , then follow the links ...

+1
source share

I am the author of jni4net , an open source interprocess bridge between the JVM and the CLR. It is built on top of JNI and PInvoke. No C / C ++ code required. Hope this helps you.

+1
source share

There are several third-party products that can do .NET-Java integration natively. J-Integra is the one with which I am most familiar (I do not work for them and I have no economic interest in them).

If you are fine with proxies, etc., you have several options, such as SOAP / Web Services or CORBA.

0
source share
0
source share

All Articles