• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic