Well, I met the same problem too.
The message above has helped me with this.
If your OS is windows-based, when you run rmiregistry and your server, the enviornment variable CLASSPATH of both the two consoles must be set to refer your classpath.
I have forgot to set CLASSPATH to the console running rmiregistry before reading this message^^.