Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Starting RMI server problem

Posted on 1998-11-02
2
Medium Priority
?
348 Views
Last Modified: 2012-06-21
Hello!

  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 =http://193.226.5.19/Project 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,
                 visualc
0
Comment
Question by:visualc
2 Comments
 

Author Comment

by:visualc
ID: 1226819
I forget to say, that the rmiregisrty is running, and give the next message:
File not found when looking for examples.hello.HelloImpl_Stub
0
 
LVL 16

Accepted Solution

by:
heyhey_ earned 200 total points
ID: 1226820
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
  heyhey
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question