• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 479
  • Last Modified:

RMI: problem with stub class [easy]

I am new with RMI. I have written an example, compiled
the classes and generated the stub and skelleton. I have
run the rmiregistry and then tried to launch the server.
This fails because the stub class cann't be found. I have
read the RMI FAQ and FAQ 27 seems to be what happen (CLASSPATH problem).

I run JDK1.1.4 and the path to the zip is:

c:\JDK1.1.4\lib\classes.zip

The classes I wrote have for package training.rmi.date.
c:\JDK1.1.4\lib\training\rmi\date contains all the
classes (including the stub). So, when I issue

java -classpath .;c:\JDK1.1.4\lib\classes.zip training.rmi.date.ServerImpl

from c:\jdk1.1.4\lib, there should be, I guess, no problem.

Could you tell me what I have missed?

Thanks for your help.

Bertrand



Note: RMI FAQ: http://java.sun.com/products/jdk/rmi/faq.html
0
fontaine
Asked:
fontaine
1 Solution
 
eugenemCommented:
It seems you forgot about c:\JDK1.1.4\lib in CLASSPATH:
java -classpath .;c:\JDK1.1.4\lib\classes.zip;c:\JDK1.1.4\lib
0
 
fontaineAuthor Commented:
You are totally rigth! The 100 points are for you. I must be
confused about something because I guessed that the . into
the classpath was including the current directory, i.e. c:\jdk1.1.4\lib itself. So, it would be very kind if you could tell me what the . is adding to the classpath (if any...).

Bertrand
0
 
ThresholdCommented:
you need rmic.exe on impl file to generate the skel file and stub file after u use javac. good luck!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now