Solved

Starting RMI server problem

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ArrayIndexOutOfBoundException 9 83
GUI builder for Eclipse? 8 36
custom annotations 9 39
Opening PDF on button click and fill new document 2 39
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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…

809 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