How do I use jdk.net.hosts.file and fallback to default NS resolution?

Viewed 286

After I added -Djdk.net.hosts.file property my app cannot resolve the name of my local machine. Is there a way to make it fallback to default resolution when nothing found in the hosts file I provided?

1 Answers

Looking at the Java sources it seems that there is no fallback, i.e. it's either the file based name resolution or the system's.

Related