• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Package problem

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use RMI to code Network connection. My RMI program structure as following:

I have a server program call DBServer in suncertify\server directory. I use rmic create DBServer_stub.class file in this directory.
I create a client jar file, called client.jar, which including the following files:

The strange thing is when I use the command

to run client code, the computer complains that it can not find suncertify\server\DBServer_stub.class. If I just directly run my
client code using java command, like

it just works fine. ALl these code are in proper package.
I do not know the reason? any one can help?
Thanks!

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look into using the "java.rmi.server.codebase" property.
Use this property to define the location of any .class files that a client may need to access when it interacts with your server. On the server side, use this property when you run your server application that does the RMI binding.
The client should be able to download any .class files it needs including the Stub class.
 
I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic