O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the RMI Registry

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required