code: @Override
      public void initialize() {
          deviceDirectory = getDeviceDirectory();
  
          /*
           First try to register ports specified in the properties
           file.  If that doesn't exist, then scan for ports.
           */
          for (int PortType = CommPortIdentifier.PORT_SERIAL; PortType <= CommPortIdentifier.PORT_PARALLEL; PortType++) {
              if (!registerSpecifiedPorts(PortType)) {
                  if (!registerKnownPorts(PortType)) {
                      registerScannedPorts(PortType);
                  }
              }
          }
      }
docs: Determine the OS and where the OS has the devices located