Solved

Starting RMI server problem

Posted on 1998-11-02
2
299 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 50 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now