Answer the question
In order to leave comments, you need to log in
How to make C# and Java friends?
The main program and its user interface are written in C#. There are also Java console
programs that must be passed to the main C# program.
How to implement it?
Answer the question
In order to leave comments, you need to log in
There are several simple options, but they are all tied to the network.
- set up a simple http server on a sharp, and connect to it in console programs and drive json back and forth
- use pure sockets, which is fraught with the invention of your own protocol, or drive something like protobuf on a nit
- use the zeromq library, and drive through it messages
I like the first and third options the most.
From C# executing Process.Start() with command line.
Further, the StandardOutput stream is read from the received Process until the process is completed.
Example: https://stackoverflow.com/questions/4291912/proces...
If there are no source codes for JAVA programs, then the easiest way is through the pipe / console. If there are source codes, you can use any interprocess communication mechanisms.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question