I have an application that tests connectivity to web and oracle servers. Recently I replaced all of the IP addresses that I'd hardcoded in my java app with DNS names that I keep in a local host file. For testing purposes, I have two hosts files, one with valid IP addresses and one with names that resolve to IP addresses that aren't reachable from my network. HOWEVER, when the application has been running using the "good" hosts file, it continues to run fine once I copy in the "bad" hosts file, even when I run "ipconfig /flushdns" after loading the "bad" hosts file.
Does java use a separate internal dns cache? Any ideas?