Skip to content
Latchkey

GitHub Actions setup-java "Could not find satisfied version"

actions/setup-java resolves java-version against the distribution you select (temurin, zulu, corretto, and so on). A version that the distribution does not publish for the runner architecture fails resolution.

What this error means

A setup-java step fails resolving the SemVer, usually after requesting a JDK version the chosen distribution does not provide for the platform.

github-actions
Error: Could not find satisfied version for SemVer '21.0.99'.
Available versions: 21.0.4, 21.0.3, 21.0.2

Common causes

Version not published by the distribution

Each distribution ships its own set of builds; an exact patch that temurin or zulu never released cannot be installed.

Distribution/architecture mismatch

The requested java-version exists for one distribution or arch but not the one selected (e.g. arm64 build missing).

How to fix it

Use a major version and a valid distribution

  1. Set java-version to a major (e.g. 21) so setup-java picks the latest published build.
  2. Confirm the distribution publishes that version (the error lists available versions).
  3. Switch distribution if your arch lacks a build (e.g. corretto for arm64).
.github/workflows/ci.yml
- uses: actions/setup-java@v4
  with:
    distribution: 'temurin'
    java-version: '21'

How to prevent it

  • Pin to a major version rather than an exact patch.
  • Keep distribution and java-version consistent across matrix legs.
  • Latchkey managed runners auto-retry the JDK download on transient mirror failures and serve it from a warm tool cache.

Frequently asked questions

What causes ""Could not find satisfied version for SemVer""?
Each distribution ships its own set of builds; an exact patch that temurin or zulu never released cannot be installed.
How do I fix "Could not find satisfied version for SemVer"?
Use a major version and a valid distribution

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card