MAC-Adresse ermitteln
Die MAC-Adressen lassen sich ab JDK1.6 sehr einfach ermitteln:
package com.sowas.javawiki; import java.net.NetworkInterface; import java.net.SocketException; import java.util.Arrays; import java.util.Collections; import java.util.Enumeration; public class MacAddress { public static void main(String args[]) throws SocketException { Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces(); for (NetworkInterface netint : Collections.list(nets)) { System.out.println("Name: " + netint.getDisplayName()); System.out.println("Mac-Adresse: " + Arrays.toString(netint.getHardwareAddress())); System.out.println(); } } }