This content has been marked as final. Show 4 replies
You would have to run each server as a separate application, not as threads in the same application.
Possibly you can achieve your goals by changing where the output from each server thread is sent. See
Reassigns the "standard" output stream.
Reassigns the "standard" error output stream.
You cannnot start a thread in one console and start another thread in another console.
The best way of differentiating the 2 server outputs are to make the output statements more intelligently something as this:
System.out.println("DiscoverServer =>" + DiscoverServer.serviceName() + " service started."); System.out.println("BackUpServer =>" + BackUpServer.serviceName() + " service started.");