I've come at this problem every way I could think of, but no luck. I need to perform a reverse DNS lookup using an IPv4 address with the InetAddress class in java. I know there are better libraries for this but I have to use InetAddress because it is required for a class I'm taking. The problem is that every time I supply an IP address, say 66.110.98.16, all i get back is the same address input. Here is my code performing the lookup.
symField.setText(
InetAddress.getByName(
dquadField.getText()
)
.getCanonicalHostName()
);
The symField and dquadField are just a jTextFields. The only thing I can think of is that it is not reaching a DNS service, but my program works in the reverse just fine. Give me some ideas, thanks.