A small code snippet that reads the computers IP and MAC address:
try {
InetAddress ip = InetAddress.getLocalHost();
NetworkInterface network;
network = NetworkInterface.getByInetAddress(ip);
byte[] macaddr = network.getHardwareAddress();
String mac = "";
for (int i = 0; i < macaddr.length; i++) {
mac += String.format("%02X%s", macaddr[i], (i < macaddr.length - 1) ? "-" : "");
}
System.out.println("IP-Address: " + ip.toString());
System.out.println("Mac-Address: " + mac);
} catch (SocketException | UnknownHostException e) {
e.printStackTrace();
}