From: Norman <nm...@sp...> - 2007-04-26 20:15:58
|
Brian Wellington schrieb: > On Thu, 26 Apr 2007, Norman Maurer wrote: > >> we using dnsjava in our project ( james.apache.org), and it works great. >> But sometimes we need to resolv "localhost". This is not possible with >> dnsjava, because it not take care about /etc/hosts etc. So we have to >> resolv such lookups with InetAddress usage. >> >> Is it planned to resolv this kind of stuff ? Maybe be able to enable it >> via a "switch" ? > > I don't know exactly what you mean by a "switch". As far as I know, > there's no standard or nonstandard way to figure out what the OS uses > other than DNS to do hostname resolution, and no way to ask the OS to > attempt alternative methods of hostname resolution without also doing > DNS queries. > > If what you're asking for is simply the ability to parse /etc/hosts, > that would be possible, but wouldn't be useful on systems with have > other ways of configuring static DNS data, and I'm pretty sure Windows > systems don't have /etc/hosts files. > > Brian Yes parsing the file whould be enough here. For sure there are other places for other OS'es. So maybe we on our own to write some wrapper to do the stuff. Thx Norman > > > |