java.net.SocketException: Invalid argument: connect

后端 未结 8 2296
闹比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 18:56

    There is a Windows bug that affects not only Java applications and produces exactly this error in certain constellations where the JRE is located on a network share: https://bugs.openjdk.java.net/browse/JDK-8068568

    Solution is either using a JRE installation on a local drive or granting the List Folder permission on all ancestor folders of the JRE exe.

    In https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/3076a9cd-57a0-418d-8de1-07adc3b486bb it is suggested to add a DWORD value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\FltMgr\UseTildeShortcut with content "1", which I didn't have a chance to try. I think I also remember reading a post on a Microsoft support forum which stated that this doesn't happen on network shares whose name is longer than 8 characters, but I can't find the post anymore.

提交回复
热议问题