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?
Asked
Active
Viewed 1,039 times
1 Answers
2
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.

Lothar
- 5,323
- 1
- 11
- 27
-
Worth noting that according to [JEP 418](https://openjdk.java.net/jeps/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." – Tasos P. May 05 '22 at 05:53