There is possibility that the computer would have no network card or have many of them therefore making MAC address-based recognition error prone.
Retrieving MAC addresses of network interfaces on computer
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements()) {
NetworkInterface networkInterface = networkInterfaces.nextElement();
System.out.println(networkInterface.getName() + " " +
networkInterface.getDisplayName());
}
The problem of many MAC addresses can be mitigated with hashing the MACs' concatenated string. But there still is an issue of no existing MAC address case.
Another possibility of unique identifying of computer is to hash some of it internal specifications, eg processor serial number, processor identifier, operating system, etc. For example by using cross-platform OSHI library. This solution is not dependant on existing network adapters on the machine.