Building an RMI Application
Unlike the other J2EE APIs we've examined before RMI, creating and running an RMI application is a multistep process that requires creating classes and interfaces, generating skeletons and stubs and running the remote object server. The steps involved are as follows.
- Create an interface that extends the Remote interface.
- Code the server to extend the appropriate RMI server object (RemoteObject or UnicastRemoteObject) and implement the Remote interface we've extended in the previous step.
- Code the client to use the interface created in step 1.
- Compile all classes.
- Run rmic to create stubs and possibly create skeletons.
- Start RMI registry or naming service and bind Remote objects into registry.
- Start RMI remote object (the ...