Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(B&S) Cant start RMI server on any other port except 1099

 
Saheed Adepoju
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I am in a dilema, i cant seem to start the RMI server on a port except that of the default RMI port and i dont seem to know why it is doing this?
An insight into the problem will highly be appreciated.Thanks.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you trying to start the RMI registry?
 
Saheed Adepoju
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Thanks for your reply. There is a RegContractor class that has the following method signature declared as thus:



And that is how i start the RMI registry. Thanks.I await your input.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks fine, though you may want to take into account the possibility that the registry already exists and use any running registry if available.
 
Saheed Adepoju
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I dont seem to understand your explanation though. I tried it on a friend's computer and it still refuses connection on any other port other than 1099. Could you please be more precised in your explanations? Thanks alot!
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Saheed,
Take a look to Naming class source code:




If no port is parsed, is set to:

As you can see in java.rmi.registry.LocateRegistry.getRegistry(String host, int port,RMIClientSocketFactory csf).
REgards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic