JDT.LS still can't load Lombok javaagent / pass VM args — false LSP diagnostics (revisit of #47561)
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.jsonkey to pass JDT.LS VM args. - Auto-detect Lombok on the project's Maven/Gradle classpath and add the
-javaagentflag automatically. - Honor
java.jdt.ls.vmargsfrom.vscode/settings.jsonwhen present.
Environment
- Claude Code CLI, macOS
- Java 25, Spring Boot 4.x, Lombok (Gradle)
- Confirmed July 2026
Refs: #47561