aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes java.rmi.server.codebase problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "java.rmi.server.codebase problem" Watch "java.rmi.server.codebase problem" New topic
Author

java.rmi.server.codebase problem

Duane Riech
Ranch Hand

Joined: Feb 27, 2003
Posts: 52
Could someone tell me what's wrong with this.
I'm trying to specify the java.rmi.server.codebase
parameter when starting up my server.
NOTE***
I've kept the directory hierarchy of
..\..\program\suncertify\db for programming. My
server program, RegFBNSDatabase, is in the
\program directory, the stubs in the
..\..\program\suncertify\db directory.

When I execute
java -Djava.rmi.server.codebase=file:.\suncertify\db
-Djava.security.policy=java.policy -DPort=1099
-DSDb=.\suncertify\db\db.db
-DRDb=.\suncertify\db\Reservationdb.db RegFBNSDatabase
using the =file:.\suncertify\db, it works fine.
IF I use =file:c:\..\..\..\program\suncertify\db
I get
Exception in thread "main" java.lang.NoClassDefFoundError: files\java\duane\deve
lopment
Any ideas???
Thanks
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
Do not use codebase, it complicates your life and the life of the assessor enormously. Just package your stubs with the client, and you will be fine. Forget about the policy file, too.

java -Djava.rmi.server.codebase=file:.\suncertify\db
-Djava.security.policy=java.policy -DPort=1099
-DSDb=.\suncertify\db\db.db
-DRDb=.\suncertify\db\Reservationdb.db RegFBNSDatabase

All of this nonsense should be reduced to just
java -jar server.jar <port>
[ April 02, 2003: Message edited by: Eugene Kononov ]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: java.rmi.server.codebase problem
 
Similar Threads
executing jar file
the README.txt file
URLyBird: runme.jar
Creepy classpath?
problem executing executable jar file