I\'m running Eclipse 3.5 and I have a frequent problem that in order to test my program, I have to do about 6-7 clicks as opposed to one click on the play button.
Th
Just to complete the validated answer: If you want to execute server and clients in parallel, you need to start a new thread for each client and server instance. You can do this as follow:
pulic class Test_ServerClient {
public static void main(final String[] args) {
Thread serverThread = new Thread() {
public void run() {
Server.main(args);
}
};
Thread clientThread = new Thread() {
public void run() {
Client.main(args);
}
};
serverThread.start();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
clientThread.start();
}
}
public class Server {
public static void main(final String[] args) {...}
}
public class Client {
public static void main(final String[] args) {...}
}