GitHub Actions setup-java "Could not find satisfied version"
By Daniel Zoghalchali·Latchkey
actions/setup-java could not provide the requested JDK because the chosen distribution does not ship that version for the runner, or the required distribution input was omitted.
What this error means
The Setup Java step fails with "Could not find satisfied version for SemVer", or errors that the distribution input is required and missing.
Actions log
Error: Could not find satisfied version for SemVer '21'.
# the selected distribution has no 21 build for this runner, or
Error: Input required and not supplied: distribution
Common causes
Distribution lacks the requested version
Each distribution (temurin, zulu, corretto, liberica) ships a specific set of JDK versions per OS/arch. Requesting a version that distribution does not provide fails resolution.
Missing distribution input
setup-java@v4 requires distribution. Omitting it fails because there is no default distribution.
How to fix it
Set a distribution that has the version
Specify both distribution and java-version, choosing a distribution that ships the JDK you need.
Confirm the distribution publishes the version for the runner OS and architecture.
Try an alternate distribution (zulu, corretto) if temurin lacks the build.
Re-run if the JDK download itself failed transiently.
How to prevent it
Always set the distribution input for setup-java.
Verify the distribution ships your JDK version for the runner arch.
Pin to an LTS JDK that all distributions provide.
Frequently asked questions
What causes "setup-java version"?
Each distribution (temurin, zulu, corretto, liberica) ships a specific set of JDK versions per OS/arch. Requesting a version that distribution does not provide fails resolution.
How do I fix setup-java version?
Specify both distribution and java-version, choosing a distribution that ships the JDK you need.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.