Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Starting RMI server problem

Posted on 1998-11-02
2
Medium Priority
?
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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

715 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