java.net.SocketException: Invalid argument: connect

后端 未结 8 2294
闹比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:09

    Also check if your IDE is using the JRE which you expect.
    I had same issue:

    java.sql.SQLException: JZ006: Caught IOException: java.net.SocketException: Invalid argument: create
    

    When I checked my run configuration, my default JRE was pointing to 'Project Execution Environment 'JavaSE1.7' which was not I was expecting.

    I changed it to option Alternate JRE and set the JAVA 8 as installed jre. which has solved my problem.

提交回复
热议问题