Take the tour ×  I'm new in Java so please forgive any obscene
errors that I may make :)  I'm developing a program in Java that
among other things it should also handle clients that will
connect to a server. The server has 3 threads running, and I
have created them in the following way :  DaemonForUI du;
DaemonForPort da; DaemonForCheck dc;  da = new DaemonForPort(3);
dc = new DaemonForCheck(5); du = new DaemonForUI(7);  Thread
t_port = new Thread(da); Thread t_check = new Thread(dc); Thread
t_ui = new Thread(du);    Each thread handles a different aspect
of the complete program. The thread t_ui is responsible to
accept asynchronous incoming connections from clients, process
the sent data and send other data back to the client. When I
remove all the commands from the previous piece of code that has
to with the t_ui thread, everything runs ok which in my case
means that the other threads are printing their debug messages.
If I set the t_ui thread to run too, then the whole program
blocks at the "accept" of th