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.
Error: Could not find satisfied version for SemVer '21.0.99'.
Available versions: 21.0.4, 21.0.3, 21.0.2Common 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
- Set java-version to a major (e.g. 21) so setup-java picks the latest published build.
- Confirm the distribution publishes that version (the error lists available versions).
- Switch distribution if your arch lacks a build (e.g. corretto for arm64).
- 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.