Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 760
Andy Avatar asked May 04 '12 10:05

Andy


People also ask

What is RMI registry in Java?

A Java RMI registry is a simplified name service that allows clients to get a reference (a stub) to a remote object. In general, a registry is used (if at all) only to locate the first remote object a client needs to use.

How do I start an RMI server on Windows?

From a command prompt, enter the following command to start the RMI server: Windows: install_dir \startRMIServer. bat. UNIX: install_dir /startRMIServer.sh.


1 Answers

Use LocateRegistry.createRegistry(port). See javadoc.

like image 141
skaffman Avatar answered Sep 22 '22 14:09

skaffman