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 Answer
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.
1 Comment
Tasos P.
Worth noting that according to JEP 418: "An application can use the non-standard, JDK-specific system property jdk.net.hosts.file [...] This feature is useful for testing but it is not a general purpose solution since the complete list of host names is not always known in advance."