java.net.SocketException: Invalid argument: connect

后端 未结 8 2297
闹比i
闹比i 2020-12-01 18:47

My new laptop (Alienware m17x) throws a java.net.SocketException: Invalid argument: connect when I run the following basic code:

Server.java:



        
8条回答
  •  忘掉有多难
    2020-12-01 19:00

    Does it work if you tell Java to use the IPv4 stack?

    Use the following command line option when starting the server and client.

    -Djava.net.preferIPv4Stack=true
    

    See also here

提交回复
热议问题