The following test case fails on Solaris 8 if IPv6 is not enabled (okay if
IPv6 enabled).
Exception in thread "main" java.net.SocketException: No such device or address
at java.net.NetworkInterface.getAll(Native Method)
at java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:158)
at ni.main(ni.java:7)
import java.net.*;
import java.util.*;
public class ni {
public static void main(String args[]) throws Exception {
Enumeration niEnum = NetworkInterface.getNetworkInterfaces();
while (niEnum.hasMoreElements()) {
NetworkInterface ni = (NetworkInterface)niEnum.nextElement();
System.out.println(ni);
}
}
}
- duplicates
-
JDK-4417951 JCK13a 3 java_net/MulticastSocket test failed to find the device or address
-
- Closed
-