Skip to content

java.jdt.ls.javac.enabled has no effect in standalone launcher #3801

Description

@mikehaertl

Setting java.jdt.ls.javac.enabled=true has no effect when running the standalone language server (used by nvim-jdtls, mason, Helix, eglot, …). The server silently keeps using ECJ — no error is logged.

Root cause

AbstractImageBuilder picks the compiler via System.getProperty("AbstractImageBuilder.compilerFactory"), else falls back to DefaultCompilerFactory (ECJ). The setting only sets a boolean in Preferences. Nothing in the standalone launch path turns it into that system property. In a p2 product install, the org.eclipse.jdt.core.javac fragment's META-INF/p2.inf injects the needed JVM args
(-DAbstractImageBuilder.compilerFactory=…JavacCompilerFactory + 19× --add-opens) via addJvmArg touchpoints. But those never run for the standalone server jar.

Reproduction

Standalone server, Java 25, java.jdt.ls.javac.enabled=true → ECJ is still used. Manually adding the p2.inf JVM args activates javac.

Request

The jdtls launcher should inject the same JVM args the p2 touchpoint does when javac is requested, giving standalone consumers parity with vscode-java, or at least document the required args.

Environment

  • eclipse.jdt.ls 1.58.0
  • jdt.core.javac 1.0.0.z20260414
  • JDK 25.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions