I have client/server appl. that uses RMI first I couldn't get it to work with a remote client because I found out that the rmiregistry uses the /etc/hosts file to resolve hostnames to IP address and in my /etc/hosts file there was a line: 127.0.0.2 myhost Obviously my client couldn't handle this address so I had to change this line to : 10.0.0.151 myhost That helped, but does anyone know a way to make the rmiregistry return the right IP address without modifying /etc/hosts (e.g. by starting the rmiregistry with a paramater) Dick
I don't think its a registry problem. I think its a registration issue in your code. Does your server code look something like this?
You should substitute 10.0.0.151 for myhost. That way it never has to do a lookup at all. If you are using a dynamic IP tho, that may not work if you ever loose your lease on that IP. There is another way to do it if thats the case, but its kind of a hack way to do it. Try this first. It should work. Chris [ January 20, 2004: Message edited by: Chris Shepherd ]