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

  1. Set a valid Project SDK (File > Project Structure > Project > SDK)
  2. Open the run configuration and explicitly select a JDK in its 'Use JDK' / JRE field
  3. 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

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


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/fa035c7e46197571. Report an issue: GitHub.