String name = "rmi://" + ip + ":" + port + "/Server";
Does it by any chance tied to windows environment?
No, it is cross-platform because it is a URL-formatted String, so you are OK. Here is more from Sun's Javadoc for Naming class:
"The Naming class provides methods for storing and obtaining references to remote objects in the remote object registry. The Naming class's methods take, as one of their arguments, a name that is a URL formatted java.lang.String of the form:
//host: port/name
where host is the host (remote or local) where the registry is located, port is the port number on which the registry accepts calls, and where name is a simple string uninterpreted by the registry. Both host and port are optional. If host is omitted, the host defaults to the local host. If port is omitted, then the port defaults to 1099, the "well-known" port that RMI's registry, rmiregistry, uses."
Incidentally, you are using "ip" as a variable name to specify the host, does it mean you expect it to be an IP address? What happens if your user specifies "FatBrain" and the server name, -- will your program still work?
Eugene.
[ February 19, 2003: Message edited by: Eugene Kononov ]