如何使用 jdk.net.hosts.file 并回退到默认 NS 分辨率?
添加 -Djdk.net.hosts.file
属性后,我的应用程序无法解析本地计算机的名称。当我提供的主机文件中找不到任何内容时,有没有办法让它回退到默认分辨率?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看Java消息来源,似乎没有后备,即它是基于文件的名称分辨率或系统的。
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.