Hi I have a client and server program, all the coding is done and compiles, the client has a GUI and the server is command line. The program uses sockets.
But when I run the client to connect to the server it keeps coming with the error message: "Usage: TodoClient []", rather than connecting to the server and starting up.
This is where the problem lies:
public static void main(String[] args) {
TodoClient client;
if (args.length > 2 || args.length == 0) {
System.err.println("Usage: TodoClient <host> [<port>]");
} else if (args.length == 1) {
client = new TodoClient(args[0], DEFAULT_PORT);
} else {
client = new TodoClient(args[0], Integer.parseInt(args[1]));
}
}
Thank You