This is a very simple example of RMI where you will come to know how RMI works and what are the steps of executions. Here listed four java files and steps for executing this application.
RemoteInterface.java
import java.rmi.*;
|
ServerImplements.java
import java.rmi.*;
|
Server.java
import java.rmi.*;
|
Client.java
import java.rmi.*;
|
javac RemoteInterface.java
javac ServerImplements.java
rmic ServerImplements
javac Server.java
javac Client.java
start rmiregistry
start java server
java Client
Output:
Sum: 4
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: RMI-Example-1 View All Comments
Post your Comment