| Author |
problem in rmi
|
deepak kushwaha
Ranch Hand
Joined: Jul 17, 2010
Posts: 33
|
|
i want to use rmi on local host so i made three things first myremote interface:
2.) myremoteimpl class:
3.)and my remoteclient class :
i first compiled all classes ,then i used rmic to extract stub class from my myremoteimpl(it doesnt gave me skeleton class out); and then in other console started rmiregistry, and then started myremoteimpl.java , so that the server is up . but it gave me javamalformedexeption: invalid url string, what is the reason, i double checked all the things but couldnt resolve the problem.
please help
[NK: Please UseCodeTags]
|
 |
Tom Reilly
Rancher
Joined: Jun 01, 2010
Posts: 618
|
|
|
I have not done RMI in years so decided to try it. I was able to compile your code and reproduce your error. I removed the space between "Remote" and "Hello" as in the following code: and the error went away (actually it was replaced by another error but that's my problem :-). If you absolutely need the space then try using java.net.URLEncoder.
|
 |
deepak kushwaha
Ranch Hand
Joined: Jul 17, 2010
Posts: 33
|
|
thanks tom for your reply, but this time when i removed the spaces and try to run rmi registry its giving me java.rmi.server.ExportExeption : listen failed on port 1099 , i cant understand what is the problem
|
 |
Rene Larsen
Ranch Hand
Joined: Oct 12, 2001
Posts: 1179
|
|
Did you shutdown the rmiregistry before you tried to start it again??
The code works if the space is removed - without any new errors.
|
Regards, Rene Larsen
Dropbox Invite
|
 |
deepak kushwaha
Ranch Hand
Joined: Jul 17, 2010
Posts: 33
|
|
Rene Larsen wrote:Did you shutdown the rmiregistry before you tried to start it again??
The code works if the space is removed - without any new errors.
hey!! thanks it worked !!!
|
 |
deepak kushwaha
Ranch Hand
Joined: Jul 17, 2010
Posts: 33
|
|
|
but let say i want to register my service by the name "Remote Hello" with spaces, what should i do???
|
 |
Tom Reilly
Rancher
Joined: Jun 01, 2010
Posts: 618
|
|
|
 |
deepak kushwaha
Ranch Hand
Joined: Jul 17, 2010
Posts: 33
|
|
|
i cant understand how to use that. i am not able to understand what this method saying. i mean i am unable to read the documentation.
|
 |
Tom Reilly
Rancher
Joined: Jun 01, 2010
Posts: 618
|
|
|
Here is an example:
|
 |
deepak kushwaha
Ranch Hand
Joined: Jul 17, 2010
Posts: 33
|
|
|
thanks
|
 |
 |
|
|
subject: problem in rmi
|
|
|