JetBrains/intellij-community · error · IllegalStateException
build.manager.launch.build.process.failed.to.find.compatible.jdk.found.too.old
build.manager.launch.build.process.failed.to.find.compatible.jdk.found.too.old
Error message
The build process requires JDK {2} or newer, but the highest JDK in this project is {0}. Install a JDK {2}+ in the project''s environment ({1}) and add it in File | Project Structure | Platform Settings | SDKs. What it means
Error "The build process requires JDK {2} or newer, but the highest JDK in this project is {0}. Install a JDK {2}+ in the project''s environment ({1}) and add it in File | Project Structure | Platform Settings | SDKs." thrown in JetBrains/intellij-community.
Source
Thrown at java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java:1269
.filter(p -> p.second != null)
.orElse(null);
}
private static @NotNull Pair<Sdk, JavaSdkVersion> getIDERuntimeSdkOrErrorIfRemote(
@NotNull Project project, int requiredFeatureVersion, @Nullable Pair<@NotNull Sdk, @NotNull JavaSdkVersion> highestRejected
) {
if (!EelProjectUtils.isProjectLocal(project)) {
var environmentName = EelProviderUtil.getEelDescriptor(project).getName();
var rejectedSdk = highestRejected == null ? null : highestRejected.first;
LOG.info("Failed to find compatible JDK for the build process. Required JDK " + requiredFeatureVersion + "+" +
", environment: " + environmentName +
", highest rejected: " + (rejectedSdk == null ? "<none>" :
rejectedSdk.getName() +
" (version=" + rejectedSdk.getVersionString() +
", home=" + rejectedSdk.getHomePath() + ")") +
". " + describeAvailableJdks(project));
if (rejectedSdk != null) {
throw new IllegalStateException(JavaCompilerBundle.message(
"build.manager.launch.build.process.failed.to.find.compatible.jdk.found.too.old",
rejectedSdk.getName() + " (" + rejectedSdk.getVersionString() + ")", environmentName, requiredFeatureVersion));
}
else {
throw new IllegalStateException(JavaCompilerBundle.message(
"build.manager.launch.build.process.failed.to.find.compatible.jdk.required.version",
environmentName, requiredFeatureVersion));
}
}
@SuppressWarnings("removal")
var sdk = JavaAwareProjectJdkTableImpl.getInstanceEx().getInternalJdk();
return new Pair<>(sdk, JavaSdk.getInstance().getVersion(sdk));
}
private static @Nullable Pair<@NotNull Sdk, @NotNull JavaSdkVersion> pickHigherJdk(
@Nullable Pair<@NotNull Sdk, @NotNull JavaSdkVersion> a,
@Nullable Pair<@NotNull Sdk, @NotNull JavaSdkVersion> b
) {View on GitHub (pinned to be881553f2)
Solutions
- Install a JDK of the required version or newer on the machine.
- Register it under File | Project Structure | Platform Settings | SDKs and set it as the project or module SDK.
Example fix
Install JDK 21, then File | Project Structure | SDKs | + | Add JDK -> select its home, and set Project SDK to it.
When it happens
Trigger: The build is configured to run with a newer Java language level or bytecode target than any JDK available in the project.
Common situations: A project using Java 17+ features opened in an environment where only an older JDK (e.g. JDK 8 or 11) is configured.
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/983d38119e491b2e.
Report an issue: GitHub.