Search code examples
javauniqueidentifieruuid

How to get a unique computer identifier in Java (like disk ID or motherboard ID)?


I'd like to get an id unique to a computer with Java, on Windows, MacOS and, if possible, Linux. It could be a disk UUID, motherboard S/N...

Runtime.getRuntime().exec can be used (it is not an applet).

Ideas?


Solution

  • It is common to use the MAC address is associated with the network card.

    The address is available in Java 6 through through the following API:

    Java 6 Docs for Hardware Address

    I haven't used it in Java, but for other network identification applications it has been helpful.