• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar and RMI don�t work?

 
Lina Mahl
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using RMI and I can start my server in my �jar file. But my client wont find my server ether with my �jar file ore when I use class files. Everything work�s fine if I use just class files.
My server says :
java �jar FlyByNightServer.jar 127.0.0.1 db.db
Server started OK!
But my client says :
java �jar FlyByNight-jar 127.0.0.1
FlyByNight : java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: suncertyfiy.bussiness.FlightManager_stub
Where should I look fore the problem? Everything works with just class files.
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Package your stubs with in the client jar, and it will work. When you start your client as "java -jar client.jar", the classpath is ignored, and the client can't find the stubs.
Eugene.
 
Lina Mahl
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ha! It worked :-) Thank you :-)
/Lina
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic