4

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

I am working on a user interface of a project that is written in C#, but I have no experience with C# and I am an avid Java user. Is it possible to build the user interface in Java using Java's Swing and AWT libraries that operates an application primarily written in C#.

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

5 Answers 5

3

You might be able to leverage some of the interoperability features that are integrated into Mono 2.0

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

JNBridge is another possible interoperability solution:

http://www.jnbridge.com/

However, a more optimal approach might be to expose your .NET code as Services - and then access them from the Java client (or through a light-weight ESB).

Of course, time, budget, resources are constraints you'll have to consider.

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

1

We did this recently and went the route of using a low level socket connection, but pushing xml through it. C# was the server side, and we used the Microsoft 'xsd' tool to generate the XSD schema for the objects and then used JAXB on the java side to generate java code to parse and hold the same objects.

As Barry mentions most of the work/problems was around the socket connection - but that depends on how comfortable you are with that.

Comments

1

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

Comments

1

I am author of jni4net, open source interprocess bridge between JVM and CLR. It's build on top of JNI and PInvoke. No C/C++ code needed. I hope it will help you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.