JDT.LS still can't load Lombok javaagent / pass VM args — false LSP diagnostics (revisit of #47561)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 21, 2026

Re-raising #47561, which was auto-closed as stale without a fix. The problem is unchanged and I hit it again today, so filing a fresh report that references it.

Problem

Claude Code's bundled JDT.LS runs without the Lombok java agent, so every Lombok-generated member reports as a false error in the LSP diagnostics while the Gradle/Maven build is completely clean. Examples seen today across a Spring Boot service:

  • log cannot be resolved (@Slf4j)
  • The blank final field <x> may not have been initialized (@RequiredArgsConstructor)
  • The method getX() is undefined for the type <T> (@Getter / @Data)

Why it matters

The noise is constant across every Lombok-annotated class, and it actively buries real diagnostics — e.g. a genuine constructor-arity mismatch after adding a dependency was surrounded by dozens of false blank-final / log errors on the same file. That erodes trust in the LSP integration for Java/Spring projects, which are overwhelmingly Lombok-based.

Root cause

JDT.LS needs the Lombok jar as a Java agent (-javaagent:/path/to/lombok.jar) in its VM args. VS Code exposes this via java.jdt.ls.vmargs. Claude Code spawns its own JDT.LS instance and offers no way to pass custom VM args.

Suggested fix (any of)

  • A .claude/settings.json key to pass JDT.LS VM args.
  • Auto-detect Lombok on the project's Maven/Gradle classpath and add the -javaagent flag automatically.
  • Honor java.jdt.ls.vmargs from .vscode/settings.json when present.

Environment

  • Claude Code CLI, macOS
  • Java 25, Spring Boot 4.x, Lombok (Gradle)
  • Confirmed July 2026

Refs: #47561

View original on GitHub ↗