UNIX domain sockets bug on Windows
Brian Stafford
Brian.Stafford at microsoft.com
Fri Mar 10 00:20:36 UTC 2023
Hi Mike,
We'll follow up on this bug report with the Windows team.
Thanks,
Brian Stafford
he/him
Principal Software Engineering Manager
Java Engineering Group
brstaffo at microsoft.com
Microsoft
> Thanks Michael, that's been a very useful suggestion. After I mailed,
> we discovered a VM that could repro the problem. This let us check the
> theory that it's FS virt related and indeed it is; disabling it fixes
> the issue. It is still worth working around it in the JVM because not
> everyone will see this thread and apps distributed via the MS Store
> using their standard instructions will hit it.
>
> To readers from the future! You have two ways to fix this if you're
> using a JVM/Windows build with the issue. One way is to add the
> following to the appropriate sections of your appx manifest:
>
> <Properties>
> <virtualization:FileSystemWriteVirtualization>
> <virtualization:ExcludedDirectories>
> <virtualization:ExcludedDirectory>$(KnownFolder:LocalAppData)\Temp\JavaSockets</virtualization:ExcludedDirectory>
> </virtualization:ExcludedDirectories>
> </virtualization:FileSystemWriteVirtualization>
> </Properties>
> <Capabilities>
> <rescap:Capability Name="unvirtualizedResources" />
> </Capabilities>
>
> and then on Windows set the system property jdk.net.unixdomain.tmpdir
> = "%LOCALAPPDATA%/Temp/JavaSockets"
>
> Or a better way, head over to https://hydraulic.software/ and download
> Conveyor which works around this bug and (sadly) several other Windows
> bugs for you.
More information about the nio-dev
mailing list