How to start RMI Registry through java code?

Andy picture Andy · May 4, 2012 · Viewed 18.3k times · Source

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)?

Answer

skaffman picture skaffman · May 4, 2012

Use LocateRegistry.createRegistry(port). See javadoc.