This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Jar-Jar Binks and Stubs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Jar-Jar Binks and Stubs" Watch "Jar-Jar Binks and Stubs" New topic
Author

Jar-Jar Binks and Stubs

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

OK, bad pun. Sorry.
I am Jarring up my client and my server. I have included the stub and skeleton files in both jars. I want to be able run them from any directory. I have a batch file, a policy file, and the db.db file to be in the same directory as the jar file. When I run the server, I get a marshalling error, whenever I have it in some other directory from the main directory I built my code from.
Here is an example
I have a c:\devexam directory. In this directory I have the db.db file and some other batch files, mostly for compiling and rmic, and running my client and server.
In subdirectories I have the source/javadoc/and class files in
c:\devexam\suncertify\db and c:\devexam\suncertify\client
In the suncertify.db package is where I have all the server code, including the stub and skeleton of my ConnectionFactory class.
If I jar with the command from the c:\devexam directory
jar -cvf server.jar suncertify\db\*.class
I get my server.jar and it has all the class files.
Now if I run java like
start rmiregistry
java -classpath server.jar;. -Drmi.security.policy=policy.all suncertify.db.ConnectionFactoryEngine
in the c:\devexam directory everything works fine. If I do put the files in c:\devexam\serverfiles It gives me the Marshalling error.
I tried adding the codebase option with the code base pointing to suncertify\db but that didn't work. I don't want to have the codebase point to a static directory. I thought that codebase using a jar file, or the classpath pointing to the jar file would work, but it didn't
Any ideas?
Mark

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Any Suggestions?
Thanks
Mark
 
wood burning stoves
 
subject: Jar-Jar Binks and Stubs
 
Similar Threads
jarring submission
jar files
RMI start error
The ultimate packaging question
How to Jar?