I'd like to connect two programs and I'm stuck, Googled everything (probably I was doing something wrong) so now I'm turning to you.
So the structure is the following, the first one (let me call it ProgramA) and the second one (let me call it ProgramB) are different softwares with different tasks.
The core of the problem is, I don't exactly know how to send a message to ProgramB via command line.
Actually I can execute ProgramB via ProgramA this way of course:
Runtime.getRuntime().exec("... ProgramB ...");
Forgot to mention that ProgramB also has a System.in reader.
How to continuously send messages to ProgramB with ProgramA, that's started from ProgramA and listens for more messages via command line?
For example: ProgramA -> ProgramB (Waiting for incoming messages)
What to do now to send something to a program that runs separately and is working like a command line?