Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help!Jar file question!!

 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have almost complete the whole assignment.Now I compress them into two jar files :client.jar and server.jar.
before I do this ,all work without problems.but after compressed.when run in local mode.it works fine.When remote mode.error found that client can't find stub class.
I placed stub class into client package so I think I don't need add codebase Parameter in console.such this :
client.jar-|----- suncertify\client\client files
|----- suncertify.server.RemoteDataImpl_stub
is it right??
I think No.but I don't know where should I place it.who can tell me?
any answer is appreciated!!!
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Xin
You should not need to specify your codebase on the client side.
Is there a reason you listed a path structure including backslashes "\" for the client class files, but the stub file is listed as being dot separated? Is this just a typo, or have you actually included a file named "suncertify.server.RemoteDataImpl_stub"?
Regards, Andrew
 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just type. like folder struct
client.jar includes|-> suncertify\client\*.*
-------------------|-> RemoteDataImpl_stub.class
my english is poor .but does this make sense?
 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the question is:
it doesn't matter what name it is. but where I should place stub files.
before I compress them .all works fine.it means codes are all correct.
but at that time .I placed stub class in suncertify.server package.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Xin
I am still a little confused as to what you are doing.
In the client jar file, you should have the directory structure "suncertify/server" and in that directory, you should have your stub class.
Is this what you have?
Regards, Andrew
 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But someone told me if I placed stub class in client.then I needn't add codebase partemter in console.Since client need download it from server.Why we can not place it directly to client package?
 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh sorry ,I just didn't understand your meaning.
you mean I should create a folder named server in suncertify.then placed stub class in it.
finally ,client.jar should include suncertify\db suncertify\client
suncertify\server.but in server folder there is only one class :stub.class.
is right?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Xin
Yes, that is correct.
Regards, Andrew
 
xin dong
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much!!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic