First Instant Messenger

Client Source       Server Source

Instructions: This is a preliminary version. Only 20 ids, from 1 to 20, are allowed. To use the client you have to set your id in the code ( at this line:

     myid = 20;
and it is a good idea to give yourself a 'handle' at this line in
     out.writeBytes(im.myid+" franco\n");
where, in this case, the handle is 'franco'. At the moment there are two hosts that can be selected from the drop-down menu, namely '' and 'localhost'. If the server is running on the same machine as the clients select localhost. If you are running, at home, on different machines, find out the IP address of the machine that the server will run on (usually something like where xxx is some number between 1 and 100 and y is either 1 or 2). Then add a line such as the following in the obvious place in
where '1' and '100' will have to be changed to match your machine's address.

To compile, use eclipse in the normal way. You can get eclipse from It's free! You will have to also get the latest version of Java SDK (now 1.6) from Install the jdk first, then eclipse.

After compiling, run the server as an application. Then run (probably from another machine) the IM client as an applet.

Note: There is a more sophisticated version of this client and server at this link. It is imcompatible with the simple client and server on this page.