rmi classpath

J

James.li

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 ?
 
P

Paul Hamaker

jars have to be named in a cp :
set CLASSPATH=./lib/jdom.jar;./lib/sqljdbc.jar;...etc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top