You can use NetworkInterface for this (http://docs.oracle.com/javase/6/docs/api/java/net/NetworkInterface.html):
Enumeration<NetworkInterface> interfaces =
NetworkInterface.getNetworkInterfaces();
while (interfaces.hasMoreElements()) {
NetworkInterface i = interfaces.nextElement();
if ( i.getHardwareAddress().... ) {
}
}