You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/08/29 10:11:45 UTC

DO NOT REPLY [Bug 49513] does not correctly set hostname when ip is link-local

https://issues.apache.org/bugzilla/show_bug.cgi?id=49513

--- Comment #1 from J.M. (Martijn) Kruithof <jk...@apache.org> 2010-08-29 04:11:43 EDT ---
getLocalHost() is only specified to return an address of the machine. There is
no reason that in general the one or the other address selected by this method
is better than any other address available on the system. While in your case
apparently the selected address of getLocalHost is "better" there is no
guarantee that this is the case for others, or will remain true in the future.

Please also see
http://stackoverflow.com/questions/901755/how-to-get-the-ip-of-the-computer-on-linux-through-java
for a more elaborate explanation.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.