Address family not supported by protocol family - SocketException on a specific computer

后端 未结 6 1394
深忆病人
深忆病人 2021-02-04 03:06

In an app which I have programmed, I have a java.net.SocketException on a specific computer:

java.net.SocketException: Address family not

相关标签:
6条回答
  • 2021-02-04 03:43

    If you are using java 6, try to change to java 7. It works for me.

    0 讨论(0)
  • 2021-02-04 03:49

    It may be a few things:

    • Anti-virus blocking the connection. If you have an anti-virus running on that computer, try disabling it for a test.
    • Java 7 trying to use IPv6 to connect: if you have Java 6 on the computers where it works and Java 7 where it fails, try disabling IPv6 in Java on the computer where it fails (instructions in this post)
    0 讨论(0)
  • 2021-02-04 03:53

    Try to check whether the spy program called "RelevantKnowledge" is installed. Its uninstallation helped me to solve the problem.

    0 讨论(0)
  • 2021-02-04 03:54

    Thanks this helped me :

    Anti-virus blocking the connection. If you have an anti-virus running on that computer, try disabling it for a test.

    Open command prompt (windows start button, type cmd in search) Click top left of command prompt, click properties, enable quick edit mode Copy: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true Right click on command prompt, should paste Hit enter. That easy!

    0 讨论(0)
  • 2021-02-04 03:55
    1. Open command prompt (windows start button, type cmd in search)
    2. Click top left of command prompt, click properties, enable quick edit mode
    3. Copy: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true

    4. Right click on command prompt, should paste

    5. Hit enter. That easy!
    0 讨论(0)
  • 2021-02-04 04:02

    For me Java option -Djava.net.preferIPv4Stack=true did the trick

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