The interaction between Java and C #

Is it possible to write a user interface in Java for an application written in C #?

I am working on a project user interface written in C #, but I have no experience with C #, and I am an active Java user. Is it possible to create a user interface in Java using Java Swing and AWT libraries that use an application written in C #.

If that sounds like a really stupid question, I apologize in advance.

+4
source share
5 answers

In addition to http://www.jnbridge.com (proprietary), you can try http://www.janetdev.org , an open source Java 5 SE JDK for the .NET platform. Currently it only supports .Net 3.5 (not Mono).

+1
source

You may be able to use some of the interaction features integrated in Mono 2.0.

http://www.mono-project.com/Main_Page

JNBridge is another possible collaboration solution:

http://www.jnbridge.com/

However, a more optimal approach may be to expose your .NET code as Services, and then access them from the Java client (or using the lightweight ESB).

Of course, time, budget, resources are limitations that you will have to consider.

+3
source

We did this recently and went the way of using a low-level socket connection, but clicked xml through it. C # was server-side, and we used the Microsoft xsd tool to create an XSD schema for objects, and then used JAXB on the java side to generate Java code to parse and store the same objects.

According to Barry, most of the work / problems are connected to the socket, but it depends on how comfortable you are with this.

+1
source

Also, for a solution that cross-compiles your Java to work in the CLR environment: http://www.ikvm.net/

+1
source

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

All Articles