Sorry, I’m very sad when talking about it. But, we can’t developed RMI in Internet’s Environment. RMI couldn’t worked when the lines have some NAT routing. Simple meaning, NAT has supporting some protocols , such as: TCP, UDP,ICMP … But, it doesn’t supporting RMI protocol.
Why does talking RMI " Protocol"? Really, RMI just is remote method invocation. But, RMI handle both transport layer. When sending packet in the line. RMI is protocol. Don’t TCP or UCP or anything else. When packet come in NAT routing, TCP check sum is incorrect(NAT routing doesn’t understand it).
So, RMI just for java. It support for java machine environment. RMI get command then achieve it in it’s way. Then put in network layer. If we was standing in NAT routing behind, RMIregistry couldn’t understand it. Detected error : Check sum incorrect.
Summary, if you have project linking PC in the internet over RMI. Let give up.