RMI Example 2

This example illustrates the use of java.rmi.registry.LocateRegistry to create and export a registry on the local host. FortuneServer.java creates its own registry, which avoids the need to run a separate rmiregistry process.

Sample run

Source files:

Fortune.java - the Fortune interface
FortuneServer.java - the server
FortuneClient.java - a standalone client
HTTPClient.java - client which gets the port via http
FortuneApplet.java - an applet
Fortune.html - page which runs the applet
Fortune.html as text
make.sh - script to compile everything
server.sh - script to run the server