code: private static Stream<Executable> locateFirefoxBinariesFromPlatform() {
      ImmutableList.Builder<Executable> executables = new ImmutableList.Builder<>();
  
      Platform current = Platform.getCurrent();
      if (current.is(WINDOWS)) {
        executables.addAll(Stream.of("Mozilla Firefox\\firefox.exe",
                                     "Firefox Developer Edition\\firefox.exe",
                                     "Nightly\\firefox.exe")
            .map(FirefoxBinary::getPathsInProgramFiles)
            .flatMap(List::stream)
            .map(File::new).filter(File::exists)
            .map(Executable::new).collect(toList()));
  
      } else if (current.is(MAC)) {
        // system
        File binary = new File("/Applications/Firefox.app/Contents/MacOS/firefox-bin");
        if (binary.exists()) {
          executables.add(new Executable(binary));
        }
  
        // user home
        binary = new File(System.getProperty("user.home") + binary.getAbsolutePath());
        if (binary.exists()) {
          executables.add(new Executable(binary));
        }
  
      } else if (current.is(UNIX)) {
        String systemFirefoxBin = new ExecutableFinder().find("firefox-bin");
        if (systemFirefoxBin != null) {
          executables.add(new Executable(new File(systemFirefoxBin)));
        }
      }
  
      String systemFirefox = new ExecutableFinder().find("firefox");
      if (systemFirefox != null) {
        Path firefoxPath = new File(systemFirefox).toPath();
        if (Files.isSymbolicLink(firefoxPath)) {
          try {
            Path realPath = firefoxPath.toRealPath();
            File attempt1 = realPath.getParent().resolve("firefox").toFile();
            if (attempt1.exists()) {
              executables.add(new Executable(attempt1));
            } else {
              File attempt2 = realPath.getParent().resolve("firefox-bin").toFile();
              if (attempt2.exists()) {
                executables.add(new Executable(attempt2));
              }
            }
          } catch (IOException e) {
            // ignore this path
          }
  
        } else {
          executables.add(new Executable(new File(systemFirefox)));
        }
      }
  
      return executables.build().stream();
    }
docs: Locates the firefox binary by platform.