I have the DNS server IP address and a hostname.
Using Java, how can I find the IP address of the hostname as returned by that DNS server using the IP address and th
As suggested by all above, you can use InetAddress.getByName("hostName") but this can give you a cached IP, Read the java documentation for the same. If you want to get a IP from DNS you can use:
InetAddress.getByName("hostName")
InetAddress[] ipAddress = DNSNameService.lookupAllHostAddr("hostName");