Package oshi.demo

Class ComputerID

java.lang.Object
oshi.demo.ComputerID

public class ComputerID extends Object
Attempts to create a unique computer identifier. Note that serial numbers won't work on Linux without user cooperation.
  • Field Details

    • NON_UNIQUE_UUIDS

      public static final List<String> NON_UNIQUE_UUIDS
  • Constructor Details

    • ComputerID

      public ComputerID()
  • Method Details

    • main

      public static void main(String[] args)

      main.

      Parameters:
      args - an array of String objects.
    • getComputerIdentifier

      public static String getComputerIdentifier()
      Generates a Computer Identifier, which may be part of a strategy to construct a licence key. (The identifier may not be unique as in one case hashcode could be same for multiple values, and the result may differ based on whether the program is running with sudo/root permission.) The identifier string is based upon the processor serial number, vendor, system UUID, processor identifier, and total processor count.
      Returns:
      A string containing four hyphen-delimited fields representing the processor; the first 3 are 32-bit hexadecimal values and the last one is an integer value.