A snippet from..
http://java.sun.com/j2se/1.4.2/docs/guide/rmi/getstart.doc.html
Naming.rebind("//myhost/HelloServer", obj);
Note the following about the arguments to the rebind method call:
* The first parameter is a URL-formatted java.lang.String, representing the location and name of the remote object.
1) No protocol needs to be specified in the URL-formatted
string.
2) You will need to change the value of myhost to be the name or IP address of your server machine; otherwise, the remote object host defaults to the current host. For example, "HelloServer" is a valid name string that refers to a remote object bound to the name HelloServer, running on the local host.
3) Optionally, a port number can be supplied in the URL-formatted string. Specifying the port number is necessary when the registry that needs to be contacted is running on a port other than the default port, 1099. For example, "//myhost:1234/HelloServer" is a valid name string for the HelloServer remote object, reachable through an RMI registry that is running on the host myhost and is listening for incoming calls on port 1234.