The rmiregistry command starts a remote object registry on the specified port on the current host.
rmiregistry [port]
The rmiregistry command creates and starts a remote object registry on the specified port on the current host. If port is omitted, the registry is started on port 1099. The rmiregistry command produces no output and is typically run in the background. For example, on Win32:
start rmiregistry
And on Solaris:
rmiregistry &
A remote object registry is a bootstrap naming service which is used by all the RMI servers on a host to register remote objects, that is bind a remote object to a name. Clients can then lookup remote objects and make remote method invocations.
The registry is typically used only to locate the first remote object an application needs to talk to. That object in turn will provide application specific support for finding other objects.
The methods of the
java.rmi.registry.LocateRegistry
class are used to get a registry operating on a particular host or host and port.The URL-based methods of the
java.rmi.Naming
class operate on a registry and can be used to lookup a remote object, bind a simple (string) name to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URLs bound in the registry.
java.rmi.registry.LocateRegistry
andjava.rmi.Naming