Network Java Examples

Some examples of networking and client/server. For the first two, compile first, then start the server on some machine.
java fileServer
Then start the client with
java readFile server filename Do not do make your main methods like they did. Let the objects themselves get going rather than the main get them going.

Simple server and client

Note that this code does not satisfy the specifications for the last lab, it is supposed to be an aid. For an example of what I might expect see a Java Client Server Lab Specification: .

To try more extensive uses of the server,

Another example (1.0) from SUN. If it doesn't work all right - don't ask me... I am putting it here so you can see some an example with an application and how one can display the processes.

Compile tcpServer.java first (it defines the Account class) (no arguments on either, but edit the server socket name in the tcpClient.java class. Currently it has codger.ecst.csuchico.edu). I compiled with 1.1 and some of it works... Both the client and server have a GUI so make sure to have your DISPLAY set properly.