Hello,All.
I can get the rmi remote object by below code:
String name = "rmi://192.168.1.248/RMIExport";
RMIExportRemote remote = (RMIExportRemote) Naming.lookup(name);
But failed when I change IP to hostname.
String name = "rmi://rt_server/RMIExport";
RMIExportRemote remote = (RMIExportRemote) Naming.lookup(name);
I have put a entry in hosts and ping rt_server return 192.168.1.248.
It seems rmi can't translate hostname into ip address.
wy.
cnwy@263.net - 17 Mar 2006 10:57 GMT
It is really strange,
When I put
192.168.1.248 www.google.com
into C:\WINNT\system32\drivers\etc\hosts
and try
String name = "rmi://www.google.com/RMIExport";
RMIExportRemote remote = (RMIExportRemote) Naming.lookup(name);
it runs very well.
wy.
Chris Uppal - 17 Mar 2006 12:18 GMT
> I have put a entry in hosts and ping rt_server return 192.168.1.248.
> It seems rmi can't translate hostname into ip address.
I can't be bothered to check the standards myself, but I have a vague memory
that _ is not allowed in hostnames.
-- chris