java-rmi-example is an example of RMI.
Extracted from javatpoint.com/RMI.
Java RMI Example The is given the 6 steps to write the RMI program.
- Create the remote interface
- Provide the implementation of the remote interface
- Compile the implementation class and create the stub and skeleton objects using the rmic tool
- Start the registry service by rmiregistry tool
- Create and start the remote application
- Create and start the client application
- compile all the java files
javac *.java
- create stub and skeleton object by rmic tool
rmic AdderRemote
- start rmi registry in one command prompt
rmiregistry 5000
- start the server in another command prompt
java MyServer
- start the client application in another command prompt
java MyClient