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)?
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.
From a command prompt, enter the following command to start the RMI server: Windows: install_dir \startRMIServer. bat. UNIX: install_dir /startRMIServer.sh.
Use LocateRegistry.createRegistry(port)
. See javadoc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With