WARNING: Do not leave the java Server program running. It allows the client to execute arbitrary commands in YOUR ACCOUNT. Java Exercise 13 Description: Simple Server/Client java applications to demonstrate connectivity. Procedure: 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: Server.java Client.java Java compiled classes: Server.class Client.class ServerConnection.class ------------------------------------------------------------------------ Back to Physics Simulation Personal Course Page