File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How to make the RMI restart? 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 "How to make the RMI restart?" Watch "How to make the RMI restart?" New topic

How to make the RMI restart?

he qinfeng

Joined: Sep 13, 2003
Posts: 23
Hi everyone:
I register ActionEvent to the JButton for start the server,code is following:

if you indicate the right portNum and dbLocation first,then click the JButton,server runs OK;But if you indicate the wrong portNum and dbLocation first and click the JButton,of course server does't run,it's strange that I indicate the right portNum and dbLocation immediately and click the JButton again,server also does'n run and throws the RemoteException?Why?Can I specify portNum and dbLocation any time and run the server ok?
Thanks for your answer.

[Andrew: put the source code between [code] and [/code] UBB tags]
[ September 23, 2004: Message edited by: Andrew Monkhouse ]

SCJP<br />SCJD(in progress)
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

Hi He,

I have edited your post to put the code between [code] and [/code] UBB tags. Doing this ensures that indenting is preserved, which makes the code easier to read.

When you are writing your post, there are a number of buttons just below the edit pane, which will insert the tags for you, so you don't have to remember what they are.

If you would like to edit your original post so that you can see what I have done, you can click on the button that is just above your post.

The problem you are experiencing seems to be an issue with how RMI is implemented by Sun - it does not appear to be possible to change the port number / stop the registry after starting it.

Regards, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
he qinfeng

Joined: Sep 13, 2003
Posts: 23
Sorry, Andrew Monkhouse,I'll follow the UBB Code next time,and thanks for solving my puzzle.
I agree. Here's the link:
subject: How to make the RMI restart?
It's not a secret anymore!