Integrating JAVA and C#
Please I need some help to choose the best way to integrate a main project in JAVA with a program write in C#, this is the situation :
The main JAVA project is an interface and it will capture an image from a microscope......I will manipulate this image in the C# program ( filters) and then return the manipulated image.
The methods that i found to integrate : JNI/JNA/WEBSERVICE
It will work in a LINUX system so another point is what is the best way to go? Try integrate or convert both programs to C++ language (since to use C# we need use MONO and i dont know the compatibility issues that will happen)
If I were to undertake this project I would probably not use JNI, but would probably use Runtime.exec to execute the C# program, as it seems you have a clean and simple interface between these programs, one file goes from java to C# and the C# returns a file back. This approach will work without build headaches on linux, solaris, windows, and probably any other OS you care about.
I would use temporary files for the images, and just pass the fully qualified path name to the files back and forth.
So if I use the runtime to implement the integration then I probably wont have any portability problem???
In anyway if I use this runtime then i will need the MONO to run it under linux plataforms??
There may still be portability issues. You'll still have to test on every platform you plan to deliver on, but at least you won't have compile time complexities, which can be maddening if you're trying to support lots of platforms.
You're still going to have to use mono on non-windows platforms.