public Object run() throws UnknownHostException { ProtocolAddress[] protocolAddresses;  protocolAddresses = getFromHostsFile(hostname); if (protocolAddresses != null) { return protocolAddresses; }  Lookup.setDefaultResolver(resolver);  final Lookup lookup; try { lookup = new Lookup(hostname); } catch (TextParseException e) { throw new UnknownHostException(hostname); }  lookup.run();  if (lookup.getResult() == Lookup.SUCCESSFUL) { final Record[] records = lookup.getAnswers(); final int recordCount = records.length;  protocolAddresses = new ProtocolAddress[recordCount];  for (int i = 0; i < recordCount; i++) { final Record record = records[i]; protocolAddresses[i] = new IPv4Address(record .rdataToString()); } } else { throw new UnknownHostException(lookup.getErrorString()); }  return protocolAddresses; }
public Object run() { System.setProperty("dns.server", "127.0.0.1"); System.setProperty("dns.search", "localdomain"); return null; }
            public Object run() throws UnknownHostException {                ProtocolAddress[] protocolAddresses;                protocolAddresses = getFromHostsFile(hostname);                if (protocolAddresses != null) {                    return protocolAddresses;                }                Lookup.setDefaultResolver(resolver);                final Lookup lookup;                try {                    lookup = new Lookup(hostname);                } catch (TextParseException e) {                    throw new UnknownHostException(hostname);                }                lookup.run();                if (lookup.getResult() == Lookup.SUCCESSFUL) {                    final Record[] records = lookup.getAnswers();                    final int recordCount = records.length;                    protocolAddresses = new ProtocolAddress[recordCount];                    for (int i = 0; i < recordCount; i++) {                        final Record record = records[i];                        protocolAddresses[i] = new IPv4Address(record                                .rdataToString());                    }                } else {                    throw new UnknownHostException(lookup.getErrorString());                }                return protocolAddresses;            }