Results 1 to 4 of 4
  1. #1
    ckask is offline Member
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Default Integrating JAVA and C#

    Hi all,


    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)

  2. #2
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    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.

  3. #3
    ckask is offline Member
    Join Date
    Feb 2011
    Posts
    2
    Rep Power
    0

    Default Reply

    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??

  4. #4
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    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.

Similar Threads

  1. Integrating U-Prove technology using JavaSDK
    By xandox in forum Advanced Java
    Replies: 1
    Last Post: 05-03-2010, 08:01 AM
  2. Integrating java and flash
    By ak88 in forum New To Java
    Replies: 1
    Last Post: 01-18-2010, 03:41 PM
  3. Replies: 0
    Last Post: 04-04-2009, 08:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •