jeudi 26 mars 2015

How to split one Java program into two without having to hand-run both programs seperately at startup



I have one program that uses MVC and three threads - one thread for View / UI, one thread for Model, and one thread for Controller. Controller talks to model using inter-process communication, model replies with stuff that the Controller processes and then passes to the View. Instead of making the model and the controller separate threads on one application, I want the model to be a separate application from the view/controller because threads are a pain and I think that separate applications will be easier to test/debug.


Now, I don't actually want to have to run two separate applications every time I want to start the program. I want to be able to click "Build/Run" in the IDE and have both applications running at the same time with a single click. I don't want to click "Build/Run Application #1" and then click "Build/Run application #2". I mean, they share the same code base because they used to be a single application. How do I get around the inconvenience of having to Build/Run two separate applications? How do I make two Java applications start up together as if they were one Java application?




Aucun commentaire:

Enregistrer un commentaire