Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

server.jar can NOT find _stub, help!

 
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
 
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
 
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!
 
Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic