SeleniumHQ/selenium · error · anyhow::Error

Unsupported OS for JRE download: {}

Error message

Unsupported OS for JRE download: {}

What it means

Error "Unsupported OS for JRE download: {}" thrown in SeleniumHQ/selenium.

Source

Thrown at rust/src/jre.rs:292

            log.debug(format!("Selected managed JRE semver {}", semver));
        }
    }
    Ok(asset)
}

fn resolve_managed_jre_root(cache_path: Option<&str>) -> PathBuf {
    let root = cache_path
        .map(PathBuf::from)
        .unwrap_or_else(default_cache_folder);
    root.join("jre").join(JRE_MAJOR_VERSION)
}

fn map_os_to_adoptium(os: &str) -> Result<&'static str, Error> {
    match os {
        "macos" => Ok("mac"),
        "linux" => Ok("linux"),
        "windows" => Ok("windows"),
        _ => Err(anyhow!(format!("Unsupported OS for JRE download: {}", os))),
    }
}

fn map_arch_to_adoptium(arch: &str) -> Result<&'static str, Error> {
    match arch {
        "x86_64" => Ok("x64"),
        "aarch64" => Ok("aarch64"),
        "x86" => Ok("x32"),
        _ => Err(anyhow!(format!(
            "Unsupported architecture for JRE download: {}",
            arch
        ))),
    }
}

fn find_java_binary(root: &Path) -> Option<PathBuf> {
    let java_binary = if OS == "windows" { "java.exe" } else { "java" };
    for entry in WalkDir::new(root).into_iter().flatten() {

View on GitHub (pinned to aa36b38e69)

Solutions

  1. Run on a supported OS (Windows, Linux, or macOS) for managed JRE download
  2. Install Java manually and ensure it is on PATH so no download is needed

When it happens

Trigger: Thrown at rust/src/jre.rs:292 when the library encounters an invalid state.

Common situations: Occurs when requesting a JRE for an operating system with no published build. Use a supported OS (Linux/Windows/macOS) or install a JRE manually.


AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14). Data as JSON: /api/errors/88b80e79163f9c1c. Report an issue: GitHub.