title: InetAddress.getLocalHost() returns wrong result when hostname is 64 chars
body: <p>I am using below code to print out hostname of a linux box using java 1.5</p>
  
  <pre><code>public static void main(String a[]) {
      System.out.println( InetAddress.getLocalHost().getCanonicalHostName() );
  }
  </code></pre>
  
  <p>When I have hostname of the system a 64 char length string, the code just prints 'localhost.localdomain'. If my hostname length is less than 64, it prints out the hostname correctly. The max hostname length for the system is 64 (getconf HOST_NAME_MAX gives 64)</p>
  
  <p>What could be wrong here? Could this be a bug (though, I am inclined to think problem is on my side)</p>
  
  <p>Thanks for help!</p>