Steps for Creating an RMI Program
The RMI module generates most of the source code you need for RMI client
and server programs. The
procedures you follow to create RMI programs are outlined below:
-
Obtain or write the remote interface that defines the interfaces for your
RMI programs. If you are using non-group RMI templates to generate server-side
code, generate your remote interface first. If you are using group templates or the RMI wizard
to generate server-side code, you can use the wizard to both 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.
-
Use either the RMI wizard or the RMI templates 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