This is the mail archive of the
mailing list for the Java project.
Re: java.net: Classpath vs. libgcj Comparison
Tom Tromey wrote:
> Aaron> I believe there is a free 100% Java implementation of DNS
> Aaron> called DNSJava, which would allow a 100% Java implementation of
> Aaron> InetAddress. I have not looked at this package in detail, but
> Aaron> the homepage is http://www.xbill.org/dnsjava/. It is licensed
> Aaron> under the LGPL, but the author might allow libstdc++ license.
> Aaron> This implementation also contains caching, I noticed. My only
> Aaron> question is how to configure it, which the README file
> Aaron> indicates is via a property, with fallback to /etc/resolv.conf
> Aaron> and several other sources. It might be worth a look. For
> Aaron> ideas if nothing else.
> One problem with this approach is that it adds another layer of
> porting problem: you have to modify it for each system to make it
> understand how lookups are done. This is particularly ugly on systems
> that have things like /etc/nsswitch.conf.
Good point. You can't assume hostname lookups will be done via DNS...
it could also be NIS+, /etc/hosts, or even WINS (depending on the
As cool as the DNSJava package is, it only solves part of the problem.