This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have done fbn_srv.jar and fbn_cli.jar. They work ok if I run them from the same directory: java -jar fbn_srv.jar db.db 1099 I have tried to get this work from any directory. I have tried this: java -classpath c:\ -jar fbn_srv.jar db.db 1099 but I get ZipException (= cannot find the jar file). Should I edit the operating system's classpath or is it more reasonable to use only -classpath option? I think the latter would be nicer but how to do it? Any help appreciated. Thank you. Jukka
I think it is not a bad idea to specify classpath and main class in the Manifest file. Sun tutorial Jar
Joined: Nov 22, 2008
Thank you for your answers. I had specified the Main classes in Manifest.mf. Now I tried defining class paths in the jar file that contains server and client jar file. It worked in my computer with Win2000 but not in test computer with only JRE in Win NT. Is that enough if I give just two command lines that the user should use? >java -classpath /mypath/fbn_srv.jar suncertify.rmi.RMIServer /mypath/db.db 1099 >java -classpath /mypath/fbn_cli.jar suncertify.flybynight.Main ip 1099 OR another way >java -jar /mypath/fbn_srv.jar /mypath/db.db 1099 >java -jar /mypath/fbn_cli.jar ip 1099 These should work from any directory. Jukka