wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Startup question: with or without jar-file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Startup question: with or without jar-file" Watch "Startup question: with or without jar-file" New topic
Author

Startup question: with or without jar-file

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Jun 13, 2000
Posts: 3340
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 Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Startup question: with or without jar-file
 
Similar Threads
A JAR PROBLEM
is it necessary
RMI start error
RMI Explanation
Development nearing end ... docs next... but question.