Steps for Creating an RMI Program
The RMI module generates most of the source code you need for RMI
client and server programs. The steps you follow to create RMI
programs are outlined below:
-
Obtain or write a remote interface that defines the interfaces for
your RMI programs. If you use an implementation file template to
generate server-side code, you can write your remote interface and
generate program files based on the interface.
-
Decide which Java source files you need generated: client-side, server-side,
or both.
-
Select an RMI template to generate the files.
-
Add the code that completes the generated files:
-
On the client side, add code that contacts an RMI Registry and looks up
a reference for an RMI server. When the RMI server is running, you can
use the RMI module's Registry Browser to generate this code for you.
-
On the server side, add code that implements the methods declared in the
remote interface.
-
Compile the package. On the server side this includes the remote
interface.
-
Run and test your programs.
Legal Notices