Hello greeting =
"rmi://" + HOST + "/Hello");
System.out.println("Message received: "
"Unable to connect to server!");
When executing the server, we need to specify where the required .class fi les are
located, so that clients may download them. To do this, we need to set the java.rmi.
server.codebase property to the URL of this location, at the same time that the server
is started. This is achieved by using the -D command line option to specify the setting
of the codebase property. For example, if the URL of the fi le location is http://java.
and would set the codebase property to the required location at the same time:
It is very easy to make a slip during the above process that will cause the application
to fail, but coverage of these problems goes beyond the scope of this text.