I have a program written in C# that receives data from a third party server and processes it into a series of integers (they are streaming rapidly). The program is written in C# because the third party provides classes to process the data, but only offers them in C#. I would like to take these integers and use them in a streaming way in a Java program (so as soon as they are streamed and processed by the C# program, I would like to use the integers in the Java program). The second program is in Java because another third party only offers their classes (which are required) in Java. So my guess for what to do is either-
- Look for a program that runs C# classes in Java, and then include the C# classes that process the incoming data directly into my Java program [This doesn't seem too promising - I can't seem to get jni4net, which was suggested in other posts, to work]
or
- Write another program in C# that saves to a particular memory location the integers that are being processed. Compile the program. Then run the executable from within the Java source code and have some sort of callback written in the Java code that picks up when the integers at the specific memory locations are changed and record what these new numbers are [Not sure how to start on this!]
Does anyone have any suggestions for what might be the least painful approach?