posted 18 years ago
You can use the DnsContextFactory to perform MX lookups. If you search for DnsContextFactory on java.sun.com you will find some pretty good examples. Start there. In the meantime here is a quick example of getting select records for an IP.
The NetworkInterface and InetAddress classes are usefull also. Look at the methods
InetAddress.getAllByName()
InetAddress.getByName()
InetAddress.isReachable()
Last but not least, you can use sockets to perfom whois lookups directly.