title: Obtain FQDN in Java
body: <p>I am trying to obtain the FQDN of a windows machine in my domain, using Java code.</p>
  
  <p>I have tried the <code>InetAddress.getByName("machine-1").getCanonicalHostName()</code> but only returns the machine name.</p>
  
  <p>On the other hand if I ping "machine-1" I get the fully domain name.</p>
  
  <p>Do you know how to do it?</p>