Hi, I follow instructions given by "Effective Use of Visual Age for Java" to create an RMI application. As said, I have to add project path to the workspace classpath so that the server program (implements rmi) can find the stub class. I did it but VAJ still throws exception, complaining xxx_Stub class not found. Does anyone out there use VAJ rmi? Thanks! KH
Bredan Tomong
Greenhorn
Joined: Dec 21, 2000
Posts: 13
posted
0
You have to compute or select the projcet you need for the excutable class. Right click the excutable class then click "classpath".
khyau
Greenhorn
Joined: May 18, 2001
Posts: 7
posted
0
I have added the project into classpath. My classes are organised as follows. ---------------------------------------------- project: Effective VisualAge for Java package: effectivevaj.adv.dist.traditionalrmi Interface: Counter classes: CounterClient (excutable) CounterImpl (ex.. ) CounterImpl_Stub -----------------------------------------------
Selecting CounterImpl -> Property -> classpath the classpath settings are as follows. ----------------------------------------------- "checked" project path: Effective VisualAge for Java "unchecked" additional directory complete classpath: .; c:\program files\ibm\visualage for java\ide\project_resources\Effective VisualAge for Java; --------------------------------------------------------- Running CounterImpl results in: ---------------------------------- [deleted] java.lang.ClassNotFoundException: effectivevaj.adv.dist.traditionalrmi.CounterImpl_Stub [deleted] --------------------------------------------------- Can you help? KH.
KH Yau
Greenhorn
Joined: May 20, 2001
Posts: 13
posted
0
I found the answer myself. I have to invoke rmi registry by coding the following line in the main program of CounterImpl.java LocateRegistry.createRegistry(1099); Previously, I invoke registry from Windows->Options->rmi registry and then click "restart rmi registry". Don't understand why the above procedures do not work (suggested by the book).