Sunday, January 6, 2002 10:35 AM
The problem is that there can be only one RMI registry created in a Vitrual Machine. (this is a limitation to the concept of RMI).
Since RMI needs to have a few objects with a known Object ID for allowing clients to find the Registry, these can not exist multiple times in the same VM.
(If you search the RMI-user archives at java.sun.com, you'll find a more detailed explanation).
What you can do is start one RMI registry from within your application with LocateRegistry.createRegistry, and start one or more other RMI registries externally (on the command prompt with 'rmiregistry').