JetBrains/intellij-community · error · ExecutionException

build.process.no.javac.path.found

build.process.no.javac.path.found

Error message

Cannot determine path to ''tools.jar'' library for {0} ({1})

What it means

Error "Cannot determine path to ''tools.jar'' library for {0} ({1})" thrown in JetBrains/intellij-community.

Source

Thrown at java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java:1400

            try {
              compilerPath = ClasspathBootstrap.getResourcePath(
                Class.forName("com.sun.tools.javac.api.JavacTool", false, BuildManager.class.getClassLoader()));
            }
            catch (Throwable t) {
              LOG.info(t);
            }
            if (compilerPath == null) {
              throw new ExecutionException(JavaCompilerBundle.message("build.process.no.javac.found"));
            }
          }
          else {
            compilerPath = ClasspathBootstrap.getResourcePath(systemCompiler.getClass());
          }
        }
        else {
          compilerPath = projectJdkType.getToolsPath(projectJdk);
          if (compilerPath == null) {
            throw new ExecutionException(
              JavaCompilerBundle.message("build.process.no.javac.path.found", sdkName, projectJdk.getHomePath()));
          }
        }
      }

      vmExecutablePath = projectJdkType.getVMExecutablePath(projectJdk);
      project.getService(BuildManagerVersionChecker.class).checkArch(projectJdk.getHomePath());
    }
    else {
      sdkName = forcedCompiledJdkHome;
      compilerPath = Path.of(forcedCompiledJdkHome, "lib/tools.jar").toAbsolutePath().toString();
      vmExecutablePath = Path.of(forcedCompiledJdkHome, "bin/java").toAbsolutePath().toString();
      project.getService(BuildManagerVersionChecker.class).checkArch(forcedCompiledJdkHome);
    }

    var projectConfig = CompilerConfiguration.getInstance(project);
    var config = CompilerWorkspaceConfiguration.getInstance(project);

View on GitHub (pinned to be881553f2)

Solutions

  1. Point the project SDK to a real JDK home directory that contains lib/tools.jar (JDK 8) instead of a JRE.
  2. Re-add the JDK under File | Project Structure | Platform Settings | SDKs so its home path is resolved correctly.

Example fix

Change the SDK home from C:/Program Files/Java/jre1.8.0 to C:/Program Files/Java/jdk1.8.0 which contains lib/tools.jar.

When it happens

Trigger: Compilation with the javac in-process compiler on JDK 8 needs tools.jar, but it cannot be located relative to the SDK home.

Common situations: The configured SDK points at a JRE directory, or the JDK installation is incomplete or was moved after being registered.


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