• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI not connecting over LAN  RSS feed

 
Sophie Jo
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an RMI client/server program which functions on one computer. WHen i try and connect a computer to a LAN and run it from there, a client on another computer cannot connect to the server. I start up the rmiregistry on the server computer.

The code on the server side is:


The code on the client side is:



I tried using another host name, but the error was "HostNotFound". I also tried using the IP address found on the computer, but that resulted in an error as well.

Thanks in advance.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
localhost typically refers to the local machine - ie the client machine. Maybe you should use the name of the server machine as it is referred to on your network.
Bill
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill is right -- you have to use the actual name of the other computer on the network. A good test is to try using the ping command (at the command line) with the name and see if you can reach the server from the client with a ping.

Kyle
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!