GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes server.jar  can NOT find _stub, help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "server.jar  can NOT find _stub, help! " Watch "server.jar  can NOT find _stub, help! " New topic
Author

server.jar can NOT find _stub, help!

Leonardo Wang
Greenhorn

Joined: Feb 19, 2002
Posts: 17
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

Joined: Feb 25, 2002
Posts: 560
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

Joined: Apr 05, 2002
Posts: 36
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

Joined: Feb 19, 2002
Posts: 17
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

Joined: Apr 05, 2002
Posts: 36


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!
 
GeeCON Prague 2014
 
subject: server.jar can NOT find _stub, help!