Ok so i have 2 jars (Console, Core)
1st-Console) receives user input
2nd-Core) processes the input and gives an output
i’m trying to have the two “Communicate” with each other by exchanging input and output
now i have tried writing to a file to communicate when i ran into the problem of “Notifying” the other that there is input to receive and output to give
i’m a bit new to this ideal so if its an easy function, please don’t criticize.
If you only have one process (which has nothing to do with having more than one Jar file), then you can simply use one Jar file in another.
But, if you are running your Jar files separately, then you have two different processes and what you need is Inter Process Communication which can be done in various ways:
Remote Method Invocation(RMI): which allows a process to execute a function in another process in another address space
Network Sockets: That allows you to send serialized data between various processes.