Actually looking at my code, I did not use "rmi://localhost" or "//localhost", I just had connectionFactory, no need to put localhost in there, since it is given. But also thinking about it I started the Registry in code. Only in lookup would you need the "rmi://" stuff Mark