File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem about launch RMI server:

 
dennis du
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used to use >java -Djava.rmi.codebase=file..... RMIServer

"Your programs must not require use of command line property specifications."

But now when I use > java -jar runme.jar server.
So I can't use the -Djava.rmi.codebase=file.....,But the Exception
always come out.

java.lang.ClassNotFoundException: suncertify.db.RMIServer_Stub

I am sure that suncertify.db.RMIServer_Stub is in runme.jar.

Anybody have a solution for this?
 
dennis du
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the guys who want to answer the question.

I found a solution for this problem.
 
Ken Kirin
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can you tell me more about how you run RMI server. I just finished most of my project but I really have no idea how to run it or even set up a server and let another computer connect it. If you could please guide me how to do this, It would be extremly helpful for me to test my code. Thank you

Ken Kirin
SCJP
SWCD
SCJD(B&S In progress)
 
peter wooster
Ranch Hand
Posts: 1033
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ken Kirin:
Hi,

Can you tell me more about how you run RMI server...


Here's my code to start the RMI registry and the DataAdapterFactory:
 
dennis du
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At fist , I start >rmiregistry port

then I use >java -jar runme.jar
 
Eric Chang
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dennis, you may want to figure out how to run the rmiregistry in your code rather than running it separately because the instructions explicitly say that you must be able to run the program using the runme.jar, and I assumed it meant that you should not have to run anything else beforehand (ie: the rmiregistry).
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At fist , I start >rmiregistry port

then I use >java -jar runme.jar
I think this will give you an automatic failure.
[ January 24, 2005: Message edited by: Paul Bourdeaux ]
 
dennis du
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone.I will encapsulated the rmiregistry in my application.

But here is question:
1. rmiregistry is a goo tool for the distributed applications.
You can run it on a computer,then run your rmi application
on any computer,what you should do just point your application's rmiregister
address to it.

2. SO when you join rmiregistry into your application.
This excellent feature will be missed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic