javaclientrmirmiregistry

How to start RMI Registry through java code?


I have written java programs for Client and Server. But, to run the program I need to start rmi registry manually! How to start RMI registry through java code (through Server)?


Solution

  • Use LocateRegistry.createRegistry(port). See javadoc.