InetAddress.getHostName under Linux

Hello,

anyone here know why InetAddress.getHostName sometimes returns <Computer-Name> only and sometimes <Computer-Name>.<Domain-Name>? I just migrated a java project to linux, and on my computer InetAddress.getHostName returns <Computer-Name>.<Domain-Name>. A colleague of mine is already running under Linux and he gets <Computer-Name>. We both have the same Domain-Name, and we have compared network settings and haven't found any differences.

I have tried to google, but I haven't found anything. Any know the reason for this behaviour?

[579 byte] By [mhstava] at [2007-11-27 11:05:14]
# 1

Either your friend is lying or you are.

jGardnera at 2007-7-29 13:07:21 > top of Java-index,Java Essentials,Java Programming...
# 2

> Either your friend is lying or you are.

Huh?

mhstava at 2007-7-29 13:07:21 > top of Java-index,Java Essentials,Java Programming...
# 3

After juggling around a bit with the network settings, turning IPv6 on and off, switching between static IP and DHCP (computer-name and domain name remained untouched), the InetAddress.getHostName suddenly returned <computer-name> only. I tried to retrace my configuration changes, and tested InetAddress.getHostName and it only returned <computer-name> without the <domain-name> extension. Did I miss something? Do anyone know when InetAddress.getHostName returns <computer-name> and when it returns <computer-name>.<domain-name>?

mhstava at 2007-7-29 13:07:21 > top of Java-index,Java Essentials,Java Programming...