Why do I need java.net.preferIPv4Stack=true only on some windows 7 systems?

前端 未结 3 1283
伪装坚强ぢ
伪装坚强ぢ 2020-12-31 22:27

I have used Java on Windows 7 (64bit) machines for quite some time and have never had problems with not being able to create a network connection. Now on the systems at the

相关标签:
3条回答
  • 2020-12-31 23:14

    Just my contribution:

    Disabling all the ipv6 on the network devices solved it for me.

    I hope this helps

    0 讨论(0)
  • 2020-12-31 23:20

    Ok so we found out the reason.

    This problem seemed to have occured on systems containing a special version of remote access software that our company used. This seems to have inserted some modified dlls into Windows network stack (We were told in order to auto-detect network connectivity). It seems this dll had some issues, causing all IPv6 traffic to be blocked. It also caused the affected Machines to have regular Bluescreens. Uninstalling that software got the system Bluescreen free and I no longer need the preferIPv4Stack setting.

    0 讨论(0)
  • 2020-12-31 23:29

    This is just a theory ...

    According to the Java documentation, if IPv6 is available on the operating system, the underlying native socket will be an IPv6 socket.

    If the operating system doesn't have IPv6, or it has properly configured IPv6, that's what you want. But if the operating system has IPv6 that is not working properly, then I imagine that Java will attempt to use IPv6 to make connections and fail.


    However if I use it Java outputs this silly "Picked up: _JAVA_OPTIONS..." to stderr.

    According to this Q&A, there is no way to turn it off: Suppressing the "Picked up _JAVA_OPTIONS" message

    I would suggest setting _JAVA_OPTIONS globally (if you must) and then unsetting it for the environment you launch your IDE from.

    0 讨论(0)
提交回复
热议问题