I'm having problems running a demo class to test my network connectivity with RMI. The start of the main method is like this.
Getting error like this.
"Exception in thread "main" java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect"
Main error from stack trace:
I thought the problem was that the HotelReservationImpl_Stub.class could not be found but I have manually created this in the classes directory so I presume it should be picked up.
Any ideas here?
Are you working on a linux machine? If it still doesn't work, maybe posting full stacktrace could point out the problem. Anyway don't create stub-class manually: from JDK 5 this is done automatically, so no need to create it yourself.