如何使用 jdk.net.hosts.file 并回退到默认 NS 分辨率?

发布于 2025-01-20 15:08:33 字数 102 浏览 2 评论 0原文

添加 -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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原谅过去的我 2025-01-27 15:08:33

查看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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文