packages/shared-skills/skills/lsp-setup/references/java/README.md
jdtls — jdtls.javahttps://github.com/eclipse-jdtls/eclipse.jdt.lsbrew install jdtlsjdtls on PATH (some distros package it as jdtls/jdt-language-server).jdtls launcher (bin/jdtls.bat or the Python wrapper) to PATH.Requires a JDK 17+ to run the language server itself (the project may target an older Java version).
Confirm it resolves:
command -v jdtls
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in .codex/lsp-client.json (Codex) AND .opencode/lsp.json (OpenCode/omo):
{ "lsp": { "jdtls": { "priority": 100 } } }
For builtin ids in a PROJECT config, command is supplied automatically — only set priority/initialization/extensions/disabled/env. A fully custom (non-builtin) server with its own command must go in the USER config (~/.codex/lsp-client.json).
jdtls maintains a per-project workspace data directory and the first index is slow (it resolves the full classpath and builds). Point JAVA_HOME at a JDK 17+ if jdtls cannot find one:
{ "lsp": { "jdtls": { "env": { "JAVA_HOME": "/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home" } } } }
Most settings (runtimes, format, import order) are passed via settings.java.* initialization options; defaults work for Maven/Gradle projects with a standard layout.
jdtls (Eclipse JDT Language Server) is the de-facto standard and powers the official VS Code Java extension.jdtls on PATH; reopen shell after install.JAVA_HOME to a JDK 17+.pom.xml / build.gradle valid; a broken build descriptor breaks symbol resolution.bun ../../scripts/verify-lsp.ts path/to/File.java