The java LSP not work #6564

Closed
opened 2026-02-16 18:04:36 -05:00 by yindo · 3 comments
Owner

Originally created by @areyouok on GitHub (Jan 17, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Use opencode with a Java project, the Java LSP is nerver appears in right panel of TUI. The agent run mvn command to check compile problems.

run

opencode --print-logs --log-level DEBUG debug lsp diagnostics TestLSP.java

The result:

INFO  2026-01-17T05:45:19 +548ms service=default version=1.1.25 args=["--print-logs","--log-level","DEBUG","debug","lsp","diagnostics","TestLSP.java"] opencode
INFO  2026-01-17T05:45:19 +1ms service=default directory=/Users/huangli creating instance
INFO  2026-01-17T05:45:19 +0ms service=project directory=/Users/huangli fromDirectory
INFO  2026-01-17T05:45:19 +5ms service=default directory=/Users/huangli bootstrapping
INFO  2026-01-17T05:45:19 +2ms service=config path=/Users/huangli/.config/opencode/config.json loading
INFO  2026-01-17T05:45:19 +0ms service=config path=/Users/huangli/.config/opencode/opencode.json loading
INFO  2026-01-17T05:45:19 +7ms service=config path=/Users/huangli/.config/opencode/opencode.jsonc loading
INFO  2026-01-17T05:45:19 +2ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.25","--exact"] cwd=/Users/huangli/.config/opencode running
DEBUG 2026-01-17T05:45:19 +1ms service=config loading config from /Users/huangli/.opencode/opencode.jsonc
INFO  2026-01-17T05:45:19 +0ms service=config path=/Users/huangli/.opencode/opencode.jsonc loading
DEBUG 2026-01-17T05:45:19 +0ms service=config loading config from /Users/huangli/.opencode/opencode.json
INFO  2026-01-17T05:45:19 +0ms service=config path=/Users/huangli/.opencode/opencode.json loading
INFO  2026-01-17T05:45:19 +0ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.25","--exact"] cwd=/Users/huangli/.opencode running
INFO  2026-01-17T05:45:19 +3ms service=plugin name=CodexAuthPlugin loading internal plugin
INFO  2026-01-17T05:45:19 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin
INFO  2026-01-17T05:45:19 +1ms service=plugin path=opencode-anthropic-auth@0.0.9 loading plugin
INFO  2026-01-17T05:45:19 +27ms service=plugin path=@gitlab/opencode-gitlab-auth@1.3.0 loading plugin
INFO  2026-01-17T05:45:19 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.25

[7.00ms] done
 stderr=Saved lockfile
 done
INFO  2026-01-17T05:45:19 +0ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","install"] cwd=/Users/huangli/.opencode running
INFO  2026-01-17T05:45:19 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.25

[22.00ms] done
 stderr=Saved lockfile
 done
INFO  2026-01-17T05:45:19 +0ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","install"] cwd=/Users/huangli/.config/opencode running
INFO  2026-01-17T05:45:19 +70ms service=bus type=* subscribing
INFO  2026-01-17T05:45:19 +0ms service=bus type=session.updated subscribing
INFO  2026-01-17T05:45:19 +0ms service=bus type=message.updated subscribing
INFO  2026-01-17T05:45:19 +0ms service=bus type=message.part.updated subscribing
INFO  2026-01-17T05:45:19 +0ms service=bus type=session.updated subscribing
INFO  2026-01-17T05:45:19 +0ms service=bus type=message.updated subscribing
INFO  2026-01-17T05:45:19 +0ms service=bus type=message.part.updated subscribing
INFO  2026-01-17T05:45:19 +0ms service=bus type=session.diff subscribing
INFO  2026-01-17T05:45:19 +0ms service=format init
INFO  2026-01-17T05:45:19 +0ms service=bus type=file.edited subscribing
INFO  2026-01-17T05:45:19 +1ms service=lsp serverIds=deno, typescript, vue, eslint, oxlint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, kotlin-ls, yaml-ls, lua-ls, php intelephense, prisma, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam, clojure-lsp, nixd, tinymist, haskell-language-server enabled LSP servers
INFO  2026-01-17T05:45:19 +0ms service=bus type=command.executed subscribing
INFO  2026-01-17T05:45:19 +0ms service=lsp file=TestLSP.java touching file
INFO  2026-01-17T05:45:19 +2ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

Checked 3 installs across 4 packages (no changes) [1.00ms]
 stderr= done
INFO  2026-01-17T05:45:19 +0ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

Checked 122 installs across 137 packages (no changes) [3.00ms]
 stderr= done
INFO  2026-01-17T05:45:19 +71ms service=lsp serverID=jdtls spawned lsp server
INFO  2026-01-17T05:45:19 +0ms service=lsp.client serverID=jdtls starting client
INFO  2026-01-17T05:45:19 +1ms service=lsp.client serverID=jdtls sending initialize
ERROR 2026-01-17T05:46:04 +45003ms service=lsp.client serverID=jdtls error=Operation timed out after 45000ms initialize error
ERROR 2026-01-17T05:46:04 +2ms service=lsp error=LSPInitializeError Caused by: Operation timed out after 45000ms Failed to initialize LSP client jdtls
{}
INFO  2026-01-17T05:46:05 +1004ms service=default directory=/Users/huangli disposing instance
INFO  2026-01-17T05:46:05 +1ms service=state key=/Users/huangli waiting for state disposal to complete
INFO  2026-01-17T05:46:05 +2ms service=state key=/Users/huangli state disposal completed

Plugins

No response

OpenCode version

1.1.25

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

MacOS 26.2 (M3 Pro)

Terminal

MacOS terminal

Originally created by @areyouok on GitHub (Jan 17, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Use opencode with a Java project, the Java LSP is nerver appears in right panel of TUI. The agent run ```mvn``` command to check compile problems. run ``` opencode --print-logs --log-level DEBUG debug lsp diagnostics TestLSP.java ``` The result: ``` INFO 2026-01-17T05:45:19 +548ms service=default version=1.1.25 args=["--print-logs","--log-level","DEBUG","debug","lsp","diagnostics","TestLSP.java"] opencode INFO 2026-01-17T05:45:19 +1ms service=default directory=/Users/huangli creating instance INFO 2026-01-17T05:45:19 +0ms service=project directory=/Users/huangli fromDirectory INFO 2026-01-17T05:45:19 +5ms service=default directory=/Users/huangli bootstrapping INFO 2026-01-17T05:45:19 +2ms service=config path=/Users/huangli/.config/opencode/config.json loading INFO 2026-01-17T05:45:19 +0ms service=config path=/Users/huangli/.config/opencode/opencode.json loading INFO 2026-01-17T05:45:19 +7ms service=config path=/Users/huangli/.config/opencode/opencode.jsonc loading INFO 2026-01-17T05:45:19 +2ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.25","--exact"] cwd=/Users/huangli/.config/opencode running DEBUG 2026-01-17T05:45:19 +1ms service=config loading config from /Users/huangli/.opencode/opencode.jsonc INFO 2026-01-17T05:45:19 +0ms service=config path=/Users/huangli/.opencode/opencode.jsonc loading DEBUG 2026-01-17T05:45:19 +0ms service=config loading config from /Users/huangli/.opencode/opencode.json INFO 2026-01-17T05:45:19 +0ms service=config path=/Users/huangli/.opencode/opencode.json loading INFO 2026-01-17T05:45:19 +0ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.25","--exact"] cwd=/Users/huangli/.opencode running INFO 2026-01-17T05:45:19 +3ms service=plugin name=CodexAuthPlugin loading internal plugin INFO 2026-01-17T05:45:19 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin INFO 2026-01-17T05:45:19 +1ms service=plugin path=opencode-anthropic-auth@0.0.9 loading plugin INFO 2026-01-17T05:45:19 +27ms service=plugin path=@gitlab/opencode-gitlab-auth@1.3.0 loading plugin INFO 2026-01-17T05:45:19 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.25 [7.00ms] done stderr=Saved lockfile done INFO 2026-01-17T05:45:19 +0ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","install"] cwd=/Users/huangli/.opencode running INFO 2026-01-17T05:45:19 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.25 [22.00ms] done stderr=Saved lockfile done INFO 2026-01-17T05:45:19 +0ms service=bun cmd=["/Users/huangli/.opencode/bin/opencode","install"] cwd=/Users/huangli/.config/opencode running INFO 2026-01-17T05:45:19 +70ms service=bus type=* subscribing INFO 2026-01-17T05:45:19 +0ms service=bus type=session.updated subscribing INFO 2026-01-17T05:45:19 +0ms service=bus type=message.updated subscribing INFO 2026-01-17T05:45:19 +0ms service=bus type=message.part.updated subscribing INFO 2026-01-17T05:45:19 +0ms service=bus type=session.updated subscribing INFO 2026-01-17T05:45:19 +0ms service=bus type=message.updated subscribing INFO 2026-01-17T05:45:19 +0ms service=bus type=message.part.updated subscribing INFO 2026-01-17T05:45:19 +0ms service=bus type=session.diff subscribing INFO 2026-01-17T05:45:19 +0ms service=format init INFO 2026-01-17T05:45:19 +0ms service=bus type=file.edited subscribing INFO 2026-01-17T05:45:19 +1ms service=lsp serverIds=deno, typescript, vue, eslint, oxlint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, kotlin-ls, yaml-ls, lua-ls, php intelephense, prisma, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam, clojure-lsp, nixd, tinymist, haskell-language-server enabled LSP servers INFO 2026-01-17T05:45:19 +0ms service=bus type=command.executed subscribing INFO 2026-01-17T05:45:19 +0ms service=lsp file=TestLSP.java touching file INFO 2026-01-17T05:45:19 +2ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 3 installs across 4 packages (no changes) [1.00ms] stderr= done INFO 2026-01-17T05:45:19 +0ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 122 installs across 137 packages (no changes) [3.00ms] stderr= done INFO 2026-01-17T05:45:19 +71ms service=lsp serverID=jdtls spawned lsp server INFO 2026-01-17T05:45:19 +0ms service=lsp.client serverID=jdtls starting client INFO 2026-01-17T05:45:19 +1ms service=lsp.client serverID=jdtls sending initialize ERROR 2026-01-17T05:46:04 +45003ms service=lsp.client serverID=jdtls error=Operation timed out after 45000ms initialize error ERROR 2026-01-17T05:46:04 +2ms service=lsp error=LSPInitializeError Caused by: Operation timed out after 45000ms Failed to initialize LSP client jdtls {} INFO 2026-01-17T05:46:05 +1004ms service=default directory=/Users/huangli disposing instance INFO 2026-01-17T05:46:05 +1ms service=state key=/Users/huangli waiting for state disposal to complete INFO 2026-01-17T05:46:05 +2ms service=state key=/Users/huangli state disposal completed ``` ### Plugins _No response_ ### OpenCode version 1.1.25 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System MacOS 26.2 (M3 Pro) ### Terminal MacOS terminal
yindo added the bug label 2026-02-16 18:04:36 -05:00
yindo closed this issue 2026-02-16 18:04:36 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4703: LSP - Java - eclipse-jdt-ls won't appear in the right hand side of the CLI TUI when enabled
  • #7270: jdtls lsp server does not work properly in a window environment.
  • #7321: After automatically installing JDTLS, you need to manually add the environment variables.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be a duplicate of existing issues. Please check: - #4703: LSP - Java - eclipse-jdt-ls won't appear in the right hand side of the CLI TUI when enabled - #7270: jdtls lsp server does not work properly in a window environment. - #7321: After automatically installing JDTLS, you need to manually add the environment variables. Feel free to ignore if none of these address your specific case.
Author
Owner

@PlayByMyself commented on GitHub (Jan 22, 2026):

I ran into the exact same jdtls timeout issue a while back. After some digging, it seemed like network problems were interrupting the download.
Quick fix I used:

@PlayByMyself commented on GitHub (Jan 22, 2026): I ran into the exact same jdtls timeout issue a while back. After some digging, it seemed like network problems were interrupting the download. **Quick fix I used**: - Grab the latest jdtls snapshot manually: https://www.eclipse.org/downloads/download.php?file=/jdtls/snapshots/jdt-language-server-latest.tar.gz - Make sure the folder exists: `mkdir -p ~/.local/share/opencode/bin/jdtls` - Unpack it: `tar -xzf jdt-language-server-latest.tar.gz -C ~/.local/share/opencode/bin/jdtls` - Double-check: Look for the `org.eclipse.equinox.launcher_*.jar` in `~/.local/share/opencode/bin/jdtls/plugins/`.
Author
Owner

@areyouok commented on GitHub (Jan 23, 2026):

uninstall opencode and re-install, set HTTP_PROXY/HTTPS_PROXY, it seems ok now

@areyouok commented on GitHub (Jan 23, 2026): uninstall opencode and re-install, set HTTP_PROXY/HTTPS_PROXY, it seems ok now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6564