aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI Client connecting to port other than 1099 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 "RMI Client connecting to port other than 1099" Watch "RMI Client connecting to port other than 1099" New topic
Author

RMI Client connecting to port other than 1099

Sham Delaney
Ranch Hand

Joined: Feb 08, 2006
Posts: 39
Hi,

I am having a problem with my client not being able to connect to server when the port is a port other than 1099.

My server is running fine on any port i specify.
Client connects no problem on 1099.
But when server is started on another port, I get a remote exception.
It is a java.net.ConnectException: Connection refused: connect.

Here is code i use to connect from client..


Do i need to specify what port the client connects to?
If so, How do i do this?
Oliver Weikopf
Ranch Hand

Joined: Feb 17, 2004
Posts: 58
Use the following:

Sham Delaney
Ranch Hand

Joined: Feb 08, 2006
Posts: 39
Hi,

I realised my mistake and got it to work using..



Thanks for the help.

Oliver, is there any benefit to using the way I am connecting...and the way you are connecting?
Oliver Weikopf
Ranch Hand

Joined: Feb 17, 2004
Posts: 58
Originally posted by Sham Delaney:
Oliver, is there any benefit to using the way I am connecting...and the way you are connecting?


I guess not. I write it the way I do just because I find it more readable.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI Client connecting to port other than 1099