I have a project written in Java (>1.5).
Is it possible to write parts of the project with C#?
For instance the GUI and calling the methods and instanciate the classes written in java?
If yes, how?
I have a project written in Java (>1.5).
Is it possible to write parts of the project with C#?
For instance the GUI and calling the methods and instanciate the classes written in java?
If yes, how?
Not without something like ikvm - or using web services etc to communicate between the two sides. Basically it's likely to be much more work than either rewriting your existing project code in C# or writing the GUI in Java.
There is something called Java Language Conversion Assistant for .NET. You can convert your Java classes to c# and start coding.
There is also something called JNBridge (not free).
It seems like my solution is very limited. and apply only to specific version of java.
I probably will stay with old good C :) Can't imagine how to work without shared libraries :)
This document explain how to create a dll from java and use it in C code. I'm not C# or java expert but i'm sure that you can load external dll's in C# as well. So not a complete solution but good starting point, IMHO. Generally dll it's a perfect way to mixing languages.
In simple way you can pack your java classes to jar file then In C# use Process class for execute and map IO stream
I did some research on this a few years ago (2005 I believe) and I liked JNBridgePro as the best third party product to do this. Check it out here http://www.jnbridge.com/
Good luck!
I am author of jni4net, open source intraprocess 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.