Search code examples
javarmi

Java RMI - Implementing Local to Implementing Remote


I understand and have coded up some RMI code and it works. I can create a RMIServer object and a RMIClient object and the client can send messages to the server and the server receives it perfectly.

My question is how do I communicate between two different computers in different parts of the world?


Solution

  • When you connect to the RMI server you provide an IP or name of the machine hosting the server. You will simply provide the IP/name of the RMI server in place of the one you're currently using.