SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
oli mueller wrote:Hi,
thank you for reply...i played a bit around and I found out that IF I start the rmiregistry from the folder in which my classes are, I do not need to specify the codebase with a VM argument...
Note: Before you start the rmiregistry, you must make sure that the shell or window in which you will run the registry either has no CLASSPATH set or has a CLASSPATH that does not include the path to any classes that you want downloaded to your client, including the stubs for your remote object implementation classes.
If you start the rmiregistry, and it can find your stub classes in its CLASSPATH, it will ignore the server's java.rmi.server.codebase property, and as a result, your client(s) will not be able to download the stub code for your remote object. For an explanation of how code downloading works in RMI, please take a look at the tutorial on Dynamic code downloading using RMI.
Note: A stub class is dynamically downloaded to a client's virtual machine only when the class is not already available locally and the java.rmi.server.codebase property has been set properly to specify where the class files are located on the server.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:I'm no RMI expert, but my basic understanding of this is that if you start the RMI Registry up in the folder that contains the classes, then you aren't actually testing that the classes are being dynamically loaded - because they aren't being dynamically loaded, because the RMI Registry has access to the classes directly.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |