RMI allows a client to download the stub and other classes from a specified URL at runtime. With this comes the burden of protecting the client program from potentially dangerous code, for the code downloaded from unknown locations cannot be completely trusted. To illustrate class downloading from a URL we place the archive files server_stub.jar and common.jar on a Web server. Let us assume that their respective URLs are:
In fact, these are valid URLs and you can use them in your experimentation.
As in the earlier section, we need three command shell windows to run the application. Run the rmiregistry in the first window, ...