The first deployment step is to start the RMI naming registry on the object server computer. The rmiregistry command is included in the Java Development Kit.
Here we show the command in Microsoft Windows to start the registry in a separate window - see your operating system's documentation for specific instructions.
The registry program manages the mapping of names to object references so that your programs can call Naming.bind to register names and Naming.lookup to retrieve references.
One caution: make sure that the classpath in effect when you start the registry does not reference the stub class files on the server. If it does, then the RMI infrastructure will not download the stub automatically to the client computer.