aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Need to start registry? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Need to start registry?" Watch "Need to start registry?" New topic
Author

Need to start registry?

Roy Augustine
Ranch Hand

Joined: Jul 08, 2003
Posts: 30
Hi all
I used RMI for my Networking. The book I followed says that I have to start rmi registry by using the command

It also says I can start registry inside program. But that books doesn�t says how.
But my program works fine even with out starting the registry. I tested it even in two different machines and it works fine. But I am not sure whether I have to start the registry. Any help? Am I doing something wrong?
2. If I have to start the registry then how can I do it using code?
Thanks in advance
Roy.
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Hi Roy.

2. If I have to start the registry then how can I do it using code?

You can start the RMI registry, on the server side, something like below.

The fact that you say your app works even without that sounds a bit worrying. Something is wrong somewhere, or you've started it without knowing. Are you sure you're testing it in server/client mode?
My suggestion is to make sure you understand how the RMI system works. Study it up a bit. Most probably you'd need that info too for the exam.
Hope you come right.
J


Jacques<br />*******<br />MCP, SCJP, SCJD, SCWCD
Roy Augustine
Ranch Hand

Joined: Jul 08, 2003
Posts: 30
Hi Jacques
Thanks for your quick reply.
I have the codes in the same way you said.
I didn�t know that

will start the registry. I thought createRegistry(port), just creates the registry for us and we have to start the registry separately.
If that is the case then I am all set for now(I think).
Thanks a lot again. You saved me from lots of worry. I have been searching for an answer in all the places for last couple of days.
Roy.
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Yip, that starts up the registry.
Glad I could help.
J
 
 
subject: Need to start registry?