Search code examples
javajvmrmi

RMI between 2 JVMs on diff physical machines


Can anyone tell me where I should make changes in an RMI program for 2 JVMs on same physical machine to 2 JVMs on diff physical machines in the example here

@Olaf- can you help me out?


Solution

  • The example that you quoted has the following URI for the RMI call:

    "rmi://localhost:1099/CalculatorService"
    

    This tells your RMI client to call RMI server on the same host. If you substitute the hostname or IP address of the remote server for the "localhost", your client would call it instead.