Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
默认情况下url.openStream();使用 IPv6。我的学校服务器默默地阻止 IPv6。这会导致url.openStream();挂起 3 分 15 秒。有没有办法让 url.openStream() 默认使用 IPv4?
url.openStream();
设置 java.net.preferIPV4Stack=true
根据:http: //download.oracle.com/javase/1.4.2/docs/guide/net/properties.html