This document provides instructions for setting up a chat server and clients that can run on either the same machine or different machines. For a single machine, start the server with ChatServer.class and then multiple clients with ClientLogin.class. For different machines, follow the same server startup, replace the localhost reference in ClientThread.java with the server's machine name, recompile and copy to clients, and run ClientLogin.class on each client machine.
Convert to study guideBETA
Transform any presentation into a summarized study guide, highlighting the most important points and key insights.
1 of 1
Download to read offline
More Related Content
How to run
1. If client and server are on the same machine.
1. Start server by executing ChatServer.class.
2. Start as many clients as you want by executing ClientLogin.class in separae
jvms.
If client and server are on different machines.
1. Start server by executing ChatServer.class.
2. Replace localhost by the name of the machine in the following line in
ClientThread.java.
s=new Socket("localhost",2500);
3. Recompile ClientThread.java.
4. Copy it to each client machine.
5. Execute the client by executing CientLogin.class at each client machine.