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 ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.