Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Startup question: with or without jar-file

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am using RMI and I read the book Complete Java 2 Certification Study Guide and the guys suggested to deliver a server.jar and client.jar file with automatic start of the main server/client class. This looks like:
java -Djava.rmi.server.codebase=file:/<path>/ -Djava.rmi.server.hostname=<hostname> -Djava.security.policy=policy -jar server.jar
and
java -Djava.rmi.server.codebase=file:/<path>/ -Djava.security.policy=policy -jar client.jar
Now the problem is that the server is throwing a ClassNotFoundException in the Stub class because its not in the path specified by me. Indeed its in the server.jar file. Is there a solution, or do i have to do it without jars?
Thanks
 
Carl Trusiak
Sheriff
Posts: 3340
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have the stub classes in both the client and server jar. It's needed by both.
------------------
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic