Java tutorial
import java.net.NetworkInterface; import java.util.Enumeration; public class Main { public static void main(String[] args) throws Exception { Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); while (e.hasMoreElements()) { NetworkInterface nif = e.nextElement(); System.out.println("Name: " + nif.getName() + ", Supports Multicast: " + nif.supportsMulticast() + ", isUp(): " + nif.isUp()); } } }