5

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 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.