Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Jar-Jar Binks and Stubs

 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mark Spritzler
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Suggestions?
Thanks
Mark
 
    Bookmark Topic Watch Topic
  • New Topic