private @NotNull Set<String> findInPATH() {
    try {
      String pathVarString = mySystemInfo.getEnvironmentVariable("PATH");
      if (pathVarString == null || pathVarString.isEmpty()) {
        return Collections.emptySet();
      }

      Set<Path> dirsToCheck = new HashSet<>();
      for (String p : pathVarString.split(mySystemInfo.getPathSeparator())) {
        Path dir = mySystemInfo.getPath(p);
        if (!StringUtilRt.equal(dir.getFileName().toString(), "bin", mySystemInfo.isFileSystemCaseSensitive())) {
          continue;
        }

        Path parentFile = dir.getParent();
        if (parentFile == null) {
          continue;
        }

        dirsToCheck.addAll(listPossibleJdkInstallRootsFromHomes(parentFile));
      }

      return scanAll(dirsToCheck, false);
    }
    catch (Exception e) {
      log.warn("Failed to scan PATH for JDKs. " + e.getMessage(), e);
      return Collections.emptySet();
    }
  }
private @NotNull Set<String> findInPATH()