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:


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.


Note: RMI FAQ: http://java.sun.com/products/jdk/rmi/faq.html
Who is Participating?
eugenemConnect With a Mentor Commented:
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
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...).

you need rmic.exe on impl file to generate the skel file and stub file after u use javac. good luck!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.