Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

server.jar can NOT find _stub, help!

 
Leonardo Wang
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The server starts OK by java suncertify.server.DatabaseServer.
But when I packed classes (_stub included) into a executable jar - server.jar and run with java -jar server.jar, classNotFound:
-Stub Exception is thrown when rebinding.
What do I need to do? at rmiregistry or somewhere else?
Do I have to pack the classes into Server.jar?
Thanks in advance!
Leon
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you start rmiregistry, in that console window, issue the following command:
set CLASSPATH=server.jar (or wherever your server.jar is located)
Also look at my explanation in the thread codebase and rmiregistry
 
Dasong
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
your suggestion please.
I cann't access db.db and userguide.html(for online help) when run client.jar
thanks
 
Leonardo Wang
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sai!
Dasong,
my userguide.html and db.db are not packed in client.jar. I just put them in the same directroy with client.jar.
 
Dasong
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Dasong,
my userguide.html and db.db are not packed in client.jar. I just put them in the same directroy with client.jar.

1.the problem is I cann't access db.db and userguide.html from client.jar. I did put them in the same dir as client.jar.
2. If I put userguide.html in doc\ which is in same dir as client.jar(starting\client.jar, starting\doc\userguide.html). how can I access userguide.html.
my code is ClassLoader.getSystemClassLoader().getSystemResource("userguide.html") this code is for first (1.) condition.
Thanks Wang!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic