In my windows
java app, it is no problem selecting the port for the server (exactly as you specify) the first time. However, once I had set the port for this registry residing in this particular JVM, I got an exception if I tried to create a new registry even at a new port. Thus the only way for me to change the port of the RMI server, once set, was to restart the program and the JVM.
AFAIK there is no way to change the port of the registry once set.
Maybe this answers your question or maybe not.
/J