from "man hosts" / etc / hosts (or the Windows equivalent) has the following format:
ip_address fully_qualified_name aliases
so in your case, the hosts file will look like this:
10.44.2.167 myserver.domain.com myserver another_alias
When Java searches for a host, if there is an entry in the / etc / hosts file, it will capture the first host name (and not an alias)
source share