11.8. Running the RMI System

Running any RMI system takes a little care, as there is a precise order to the running of applications. Before the client can invoke methods, the registry must be running. Nor can the service be started before the registry, as an exception will be thrown when registration fails. Furthermore, the client, server, and registry need access to the interface, stub, and skeleton classes, which means they must be available in the class path, unless dynamic loading is used (discussed in Section 11.10). This means compiling these classes, and copying them to a directory on the local file system of both client and server (as well as the registry, if it is located elsewhere), before running them.

NOTE

Remember to run the rmic ...

Get Java™ Network Programming and Distributed Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.