Win a copy of AWS Security this week in the Cloud/Virtualization 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Jar-Jar Binks and Stubs

Posts: 17346
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;. 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 Spritzler
Posts: 17346
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any Suggestions?
You learn how to close your eyes and tell yourself "this just isn't really happening to me." Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic