Is there any way to get the canonical domain name for localhost? The machine that I am working on only returns the short domain name (node name). If the machine I am on is named 'lust' and its domain is 'mpath.com' I want to get 'lust.mpath.com' back. This is the code that I was using to try and get a host name: String localaddr = java.net.InetAddress.getLocalHost().getHostAddress(); System.out.println (java.net.InetAddress.getByName (localaddr)); If anyone knows how to do this it would be a big help if you could let me know. --jason