Sun's RMI tutorial fails for me

Hi, I'm new to RMI and thought I'd start with Sun's RMI tutorial that comes with the documentation download in jdk1.5.

I am following this tutorial word for word, even using their supplied source code without modification and I get a ClassNotFoundException when running the Server class. The beginning of the stack trace is pasted below.

It sounds like you need to set the java.rmi.server.codebase property when you run your server. This property tells remote JVMs where to get class files from when they get a remote reference that they don't have a class file for. The RMI registry is itself a remote Java program running in another JVM, so when you try to bind, it's going to fail because it doesn't have a reference to your class files. The command line to start the server should look something like this -

hey I am facing a similar problem. Actually the jdk1.5 specs [http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html#51] specify clearlythat codebase is needed to be specified only if pre1.5 JVM clients need to be supported, which is not the case here.

SO why the jvm is not able to find classes and program not running.

I dunno actually my whole thing was working initially where i had Mandrake with jdk installed using rpm, but i just got debian installed and installed jdk from bin package where the same code has stopped running.

When using RMI u need to set some platform specific properties. for example on windows u need to set system.properties. in the same way u just search for similar properties files on your Linux platform(I am not sure which properties file you will be using i Linux Platform )