Java Exercise 13
Simple Server/Client java applications to demonstrate connectivity.
Choose an arbritrary port number (preferably higher than 1023), and use it as the portnr parameter in the following procedure...
1. Start the server app with "java Server portnr"
2. Start client app in another window with "java Client portnr"
The client's port number have to match that of the server in order for the client to connect to it. Several clients can connect to the same running server at the same time. Try it with different terminal windows!
The following command/request to the server from the client side are available:
INFO - Gives a short reply
ID - Identifies the client sending this request
EXEC commandline - Executes the commandline in your system e.g. "EXEC ls" will display the current directory in a Unix environment. The commandline might also be any program you wish to start remotely.
quit/exit - disconnects the client from the server and quits client app
Java source code:
Java compiled classes:
Back to Physics Simulation Personal Course Page