• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI  RSS feed

 
virginia pi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to RMI and I'm trying to implement it for a small game; however when I try to run it, it doesn't work and I've spent a lot of time to understand why, but I still haven't figured it out. Maybe some of you have something similar happened to them

This is the client:



this is the server:




and this is the error that it's showed when I try to run it


 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try defining "HOST" as "localhost" instead of as "127.0.0.1".

Also check to make sure that you don't have a firewall blocking RMI calls. The "netstat" command can be used to determine if your RMI server is running properly.
 
virginia pi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Changing "127.0.0.1" into "localhost" worked! Thank you for your help
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The documentation was imprecise. Where it said "host", it should properly have said "(resolvable) hostname".

The getRegistry was attempting to locate a host with the name of "127.0.0.1" instead of the address of 127.0.0.1, so it failed.

Apparently there's no getResistry call for an IP address, but if you don't supply any arguments, localhost is the default.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!