Introduction to Client-Server interactions
INSTRUCTIONS FOR PROPER EXECUTION: Please download all files onto your machine before attempting any execution, and ensure you are in the proper working directory in your cmd.
-
Compile Server.java with a command such as "javac Server.java"
-
Compile Client with a command such as "javac Client.java"
-
Run the server by issuing the command: "java Server " NOTE: e.g java Server 5276 200 100 Red White Blue
-
Run the client by issuing the command: "java Client" on a separate computer or cmd window
-
Enter IP/Port in the client as designated by your server startup line, in our example IP could be "localhost"/"127.0.0.1" and port is defined as "5276"
-
ENJOY!