Starting RMI server problem


  I'm a beginner in Java-rmi; there is the next problem:
after developing and compiling the remote object interface, the applet and server and after realizing the stub and skeleton class for the server, I have the next directory structure:

-in c:\website\htdocs\project is my startsrvr.bat, which contain the next code:

SET CLASSPATH=c\website\htdocs\project;c\website\htdocs\project\examples\hello
c:\jdk1.1.5\bin\java -Djava.rmi.server.codebase = examples.hello.HelloImpl &

-in the c:\website\htdocs\project\examples\hello is the
HelloApplet.class, HelloImpl.class, Hello.class (the interface), HelloImpl_Skel.class and HelloImpl_Stub.class

After running the startsrvr.bat, I have the next message:
unexpected exception; nested eception is
java.lang.ClassNotFoundException: examples.hello.HelloImpl_Stub,
the stack trace shows, that when in the HelloImpl main function the JVM try to bind an URL to my class, he couldn't find HelloImpl_Stub.class. Why??
 Best regards,
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

heyhey_Connect With a Mentor Commented:
it seems that this is CLASSPATH problem

1. if seems that Hello is from package examples.hello, classpath should point to the directory where your package starts - c:\website\htdocs\project\

2. you'd better adjust the CLASPATH before you start rmiregistry - it seems that rmiregistry uses the CLASSPATH that it has found when it was started

hope this helps
visualcAuthor Commented:
I forget to say, that the rmiregisrty is running, and give the next message:
File not found when looking for examples.hello.HelloImpl_Stub
All Courses

From novice to tech pro — start learning today.