I'm doing the following to lookup an Internet address. It fails specifically on Solaris machines that have IPv6 nameservers in the resolv.conf. Works fine on Windows machines that have IPv6 nameservers and on IPv4 only Solaris machines. From the error returned it appears that the Java "getAttributes" line is failing internally (somewhere deep) with a parsing problem when presented with an IPv6 nameserver. My question is, "is there a way to do this better that works properly on Solaris when IPv6 is in use?"
InetAddress localhost=InetAddress.getLocalHost();
ipAddress=localhost.getHostAddress();
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
DirContext ictx = new InitialDirContext(env);
Attributes attrs=ictx.getAttributes("blah.test.fakedomain", new String[] { "A" });