• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Startup question: with or without jar-file

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • 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
 
Sheriff
Posts: 3341
  • 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
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic