Any client object using RMI must be able to locate the remote object server. This can be accomplished in several ways. One approach is to use the RMI registry, which is the approach used in the previous examples. The RMI registry is a program included with the JDK named rmiregistry. This program is invoked from the command line using the following syntax.
rmiregistry <runtime_options> <port>
The runtime options are options that are passed to the Java runtime environment. The port is the port where the registry will listen for connections. The default port for the RMI registry is 1099. To have the RMI registry listen on port 1100 instead of port 1099, the following could be issued from the command line.
rmiregistry 1100 ...