I have a question when I write RMI program .
file direction as follow:
D:\project\
D:\project\build\
D:\project\build\classes\
D:\project\build\classes\report\
D:\project\build\classes\report\ReportAssist.class
D:\project\build\classes\report\ReportAssistImpl.class
D:\project\build\classes\report\ReportAssistServer.class
D:\project\build\classes\report\ReportAssistClient.class
D:\project\build\classes\report\ReportAssistImpl_Stub.class
D:\project\lib\
D:\project\lib\jdom.jar
D:\project\lib\sqljdbc.jar
D:\project\config.xml
#rmiregistry 2001
cd D:\project\
set CLASSPATH=./lib/;./build/classes/
rmiregistry 2001 --has success
#start server
cd D:\project\
java -Djava.rmi.server.codebase=file:D:\project\lib\ -classpath
./build/classes/ report.ReportAssistServer --has success
#start client
cd D:\project\
java -Djava.rmi.server.codebase=file:D:\project\lib\ -classpath
./build/classes/ report.ReportAssistClient
--exception
java.lang.NoClassDefFoundError: org/jdom/JDOMException
The server side has printed information when start client .
How do I set the classpath ?
Paul Hamaker - 04 Apr 2006 07:50 GMT
jars have to be named in a cp :
set CLASSPATH=./lib/jdom.jar;./lib/sqljdbc.jar;...etc
--------------------
Paul Hamaker, SEMM, teaching ICT since 1987
http://javalessons.com
James.li - 10 Apr 2006 02:36 GMT
yeah ..you are right ...thanks you .