We see the below tests failing on several of our test machines, the windows installations all are able to support IPv6 but have no IPV6 addresses configured on their network interfaces.
The tests pass on other machines that have at least a link local ipv6 address configured.
java/nio/channels/DatagramChannel/AdaptorMulticasting.java
java/nio/channels/DatagramChannel/Loopback.java
java/net/DatagramSocket/DatagramSocketExample.java
java/net/DatagramSocket/DatagramSocketMulticasting.java
java/net/MulticastSocket/IPMulticastIF.java
java/net/MulticastSocket/JoinLeave.java
java/net/MulticastSocket/NoSetNetworkInterface.java
DatagramSocketExample throes this exception for excample:
java.net.SocketException: Invalid argument:
at java.base/sun.nio.ch.Net.setInterface6(Native Method)
at java.base/sun.nio.ch.DatagramChannelImpl.setOption(DatagramChannelImpl.java:364)
at java.base/sun.nio.ch.DatagramSocketAdaptor.setOption(DatagramSocketAdaptor.java:420)
at java.base/java.net.DatagramSocket.setOption(DatagramSocket.java:1194)
at DatagramSocketExample.test(DatagramSocketExample.java:132)
at DatagramSocketExample.main(DatagramSocketExample.java:83)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:833)
It might be caused by the network code detecting that the OS is IPv6 capable but windows does not allow to use IPv6 socket options for IPv4 only sockets.