JetBrains/intellij-community · error · ExecutionException
error.jdk.not.specified
error.jdk.not.specified
Error message
JDK is not specified
What it means
Thrown by RemoteConnectionBuilder.checkTargetJPDAInstalled when building the launch parameters for remote debugging and parameters.getJdk() returns null. Building the JPDA attach setup needs a JDK (to resolve tools/foundation classes and the runtime environment), so a run configuration without an SDK is rejected before launch.
Source
Thrown at java/debugger/impl/src/com/intellij/debugger/impl/RemoteConnectionBuilder.java:171
boolean isIdeaBuild = ContainerUtil.exists(pathsList.getPathList(), p -> p.contains("intellij.java.rt"));
if (isIdeaBuild) {
// When building IDEA itself, idea_rt.jar should not be taken from sources,
// as IDEA expects to use the matching idea_rt.jar from the installation dir.
String path = JavaSdkUtil.getIdeaRtJarPath();
pathsList.addFirst(path);
LOG.debug("Running IDEA from release IDE, add rt.jar: " + path);
}
else {
JavaSdkUtil.addRtJar(pathsList);
LOG.debug("Running from release IDE, add rt.jar");
}
}
}
}
private static void checkTargetJPDAInstalled(@NotNull JavaParameters parameters) throws ExecutionException {
if (parameters.getJdk() == null) {
throw new ExecutionException(JavaDebuggerBundle.message("error.jdk.not.specified"));
}
}
}
View on GitHub (pinned to be881553f2)
Solutions
- Set a valid Project SDK (File > Project Structure > Project > SDK)
- Open the run configuration and explicitly select a JDK in its 'Use JDK' / JRE field
- Re-add the deleted JDK in IDE SDK table (Project Structure > SDKs) and re-select it
Defensive patterns
Strategy: validation
Validate before calling
if (parameters.getJdk() == null) {
throw new ExecutionException("JDK is not specified"); // or pre-check in UI and block Apply
} Try / catch
try {
checkTargetJPDAInstalled(parameters);
} catch (ExecutionException e) {
// prompt user to select Project/Run-configuration SDK and abort launch
} Prevention
- Set a valid Project SDK before creating remote debug configurations
- Pin an explicit JDK in each remote configuration instead of '#Use project SDK' where possible
- Re-validate SDKs after JDK updates or machine migration
When it happens
Trigger: Starting a remote debug session whose run configuration (or project) has no JDK set: JavaParameters.getJdk() == null at checkTargetJPDAInstalled, throwing ExecutionException(error.jdk.not.specified).
Common situations: Project SDK was removed or invalidated after an IDE/JDK update; run configuration has SDK field set to '#Use project SDK' while the project SDK is <No SDK>; CI machine missing the configured JDK path.
Related errors
- error.text.invalid.port
- Malformed exclusion, 'groupId:artifactName' format is expect
- Interface method invocation is not supported in JVM {}. Use
- There is no executable code at {0}:{1}
- Cannot construct wrapper object for value of type {}: Unable
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/fa035c7e46197571.
Report an issue: GitHub.