Solved

RMI: problem with stub class [easy]

Posted on 1997-10-23
3
470 Views
Last Modified: 2012-06-21
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
Comment
Question by:fontaine
3 Comments
 
LVL 3

Accepted Solution

by:
eugenem earned 100 total points
ID: 1229428
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
 
LVL 5

Author Comment

by:fontaine
ID: 1229429
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
 

Expert Comment

by:Threshold
ID: 1229430
you need rmic.exe on impl file to generate the skel file and stub file after u use javac. good luck!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.

821 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