Is there a java api to validate domain name entries ? getByName() does it to some extent, but not the right one to use though. Eg: getByName() fails to identify sun.com as a valid domain name.
There is of course no way to do it with zero network overhead. Look into InetAddress getByName, isReachable, etc. See if one of those gives the expected results on a good domain and a bogus one.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi