How to Run Java RMI?

11 Mar 2011 by

There is a tricky in getting Java RMI works and runs. First, you need to understand the Overview of Java RMI and know how to implement it. Java RMI relies on 3 components–client, server and registry service.

Note: This article refers to the code developed in How to Implement Java RMI.

Registry Service

There are 2 ways to deal with registry service.

  • Run rmiregistry command in Dos prompt or Console if it is not created in the code
  • Create RMI registry service in the code

Registry registry = LocateRegistry.createRegistry(1099);


    • It needs interface class( created in Step 1 of How to Implement Java RMI article
    • Run java PowerServer


    • It also needs interface class (
    • Be sure that you pointed to the right server’s registry service
    • Run java PowerClient

    No responses yet

    Leave a Reply

    Time limit is exhausted. Please reload the CAPTCHA.