SeleniumHQ/selenium · error · anyhow::Error
Downloaded Java runtime but failed to resolve java binary in
Error message
Downloaded Java runtime but failed to resolve java binary in {} What it means
Error "Downloaded Java runtime but failed to resolve java binary in {}" thrown in SeleniumHQ/selenium.
Source
Thrown at rust/src/jre.rs:176
let extracted_root = extracted_root.ok_or_else(|| {
anyhow!(
"Downloaded archive did not contain expected Java runtime structure in {} or {}",
temp_extract.display(),
install_parent.display()
)
})?;
if extracted_root != install_root {
fs::rename(&extracted_root, &install_root)?;
}
// Clean up temporary extraction directory
if temp_extract.exists() && temp_extract != install_root {
fs::remove_dir_all(&temp_extract)?;
}
let runtime = detect_managed_jre_candidate(&install_root)?.ok_or_else(|| {
anyhow!(format!(
"Downloaded Java runtime but failed to resolve java binary in {}",
install_root.display()
))
})?;
Ok(runtime)
}
fn detect_managed_jre_candidate(install_root: &Path) -> Result<Option<JavaRuntime>, Error> {
if install_root.exists()
&& let Some(runtime) = detect_managed_jre(install_root)?
{
return Ok(Some(runtime));
}
if let Some(parent) = install_root.parent()
&& parent.exists()
&& let Some(runtime) = detect_managed_jre(parent)?View on GitHub (pinned to aa36b38e69)
Solutions
- Delete the cached JRE directory to force a clean re-download
- Check that the cache folder is writable and not blocked by antivirus
- Install Java manually and make sure 'java' is on PATH
When it happens
Trigger: Thrown at rust/src/jre.rs:176 when the library encounters an invalid state.
Common situations: Occurs when the extracted Java runtime has no java binary where expected. Clear the Selenium Manager cache and re-download; verify the archive matched your OS/architecture.
AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14).
Data as JSON: /api/errors/9257d751689c9007.
Report an issue: GitHub.