• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package problem

 
Wai Iu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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!

 
Doug Melzer
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic