Of course JDK. I am using 1.3.0 now.
Originally posted by Mark Spritzler:
No you do not need a web server. you would only need a web server if you are dynamically downloading the stubs. In this case you are not using Dynamic downloading. The stubs will be with your client.
Here's a way to test. Create your object that you will bind into the registry. Run RMIC on this class to produce the stubs, etc. Then run the registry, run the class that will bind the object into the registry.
Create a client class that will lookup the class in the registry and call a method on the remote object.
That is a simple way to explain it. You might want to make sure you classes are all in your classpath.
Um unfortunately you might need to upgrade to a newer production version. 1.3.0 is past the eighteen months of a newer version and by the instructions isn't a valid version to use.
...you have to have a web server to have "dynamically loading server classes" to work...
Is it because the file:/// approach doesn't know how to dynamically load server classes to client JVM ?
Welcome to JavaRanch.
If you start the RMI Registry from within your application, you do not need to set the codebase.
If you copy the stub files into the client jar file, you will not need to dynamically download them.
First the interface (which should be in both the client and server directories):
How do you start the RMI registry from my appliation ? I haven't seen any documentation at java.sun.com so far yet..
I hope I am being clear enough now, so what do you think now ? Is what I am trying to accomplish technically doable ?
Again I am testing the file:/// approach with my server and client running on a same physical box, I am planning to test out the web server shortly
To avoid unnecessary complexity in the marking environment certain restrictions are placed on solutions that use RMI. Specifically:
[list]You must not require the use of an HTTP server. You must not require the installation of a security manager. You must provide all classes pre-installed so that no dynamic class downloading occurs. You must use RMI over JRMP (do not use IIOP)
So although you can get away with dynamically downloading your code (and even using a web server) because it is not specifically disallowed, you might want to think about whether you really want to do something that Sun are explicitly stopping people from doing in later assignments.