RMI connection refused on localhost

The target of Naming.rebind() is the RMI Registry. It has to be running. It wasn’t running. So you couldn’t connect to it. So you got a ConnectException.

I believe that the code for Implementation does not matter as it simply is the implemented interface that will run the code.

This is both meaningless and irrelevant. Interfaces do not ‘run the code’. Methods in classes run the code, and in this case the implementation class runs the code. However your problem is not in ‘run[ning] the code’, it is in connecting to the Registry.

Leave a Comment