Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Sockets and Internet Protocols and the fly likes getting remote host name works with LINUX not OS X Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "getting remote host name works with LINUX not OS X" Watch "getting remote host name works with LINUX not OS X" New topic
Author

getting remote host name works with LINUX not OS X

Nate Lockwood
Ranch Hand

Joined: Feb 22, 2010
Posts: 83
I'm just completing a package that will control communications for a set of headless computers on a LAN in an aircraft by passing message objects. This was all new to me but I got it working with my two LINUX computers, one acting as a master and the other a server. I don't have another LINUX machine to test it with two clients so I thought, "why not try my mac Air" and hooked it up. There's a problem in that I use the remotes IP address to get the remote's name, both the master and client do this, but the mac Air client nor the Master can get each other's name. On the LINUX to LINUX connection the host names are returned but with the LINUX to OS X connection it's the IP addresses.

ipaddress and hostname are Strings. Tell is my logging class.



The computers are on the same LAN all connected to the same router.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getting remote host name works with LINUX not OS X
 
Similar Threads
java.net.UnknownHostException
how to connect to other machine rather than localhost.
How to run an application as name-based in tomcat
IP Address / Hostname validation
Tomcat on Mac OS X with Windows in a VirtualBox