LSP - Java - eclipse-jdt-ls won't appear in the right hand side of the CLI TUI when enabled #3095

Open
opened 2026-02-16 17:38:36 -05:00 by yindo · 7 comments
Owner

Originally created by @dehidehidehi on GitHub (Nov 24, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Hello,

After setting up the jdtls LSP for Java, and after checking that the LSP process is started by opencode, it won't appear as an active LSP in the right hand side of the CLI TUI.
If prompted, the LLM will return LSP diagnostics, so it is running.

For other LSPs, such as pyright, or typescript LSPs, they appear fine in the right hand side of the TUI.

Is it possible to get the jdtls LSP to appear as active?

Cheers,

OpenCode version

1.0.107

Steps to reproduce

Using default LSP configuration for Java.

Screenshot and/or share link

No response

Operating System

Ubuntu 22.04

Terminal

konsole

Originally created by @dehidehidehi on GitHub (Nov 24, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description Hello, After setting up the jdtls LSP for Java, and after checking that the LSP process is started by opencode, it won't appear as an active LSP in the right hand side of the CLI TUI. If prompted, the LLM will return LSP diagnostics, so it is running. For other LSPs, such as pyright, or typescript LSPs, they appear fine in the right hand side of the TUI. Is it possible to get the jdtls LSP to appear as active? Cheers, ### OpenCode version 1.0.107 ### Steps to reproduce Using default LSP configuration for Java. ### Screenshot and/or share link _No response_ ### Operating System Ubuntu 22.04 ### Terminal konsole
yindo added the opentuibug labels 2026-02-16 17:38:36 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 24, 2025):

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

  • #2121: Indicator if an LSP is 'on' for a language? - This closed issue discusses the lack of a visible indicator to verify if an LSP is running and active for a particular language, which appears to be the same root concern you're reporting for jdtls.

Feel free to ignore if this doesn't address your specific case.

@github-actions[bot] commented on GitHub (Nov 24, 2025): This issue might be a duplicate of existing issues. Please check: - #2121: Indicator if an LSP is 'on' for a language? - This closed issue discusses the lack of a visible indicator to verify if an LSP is running and active for a particular language, which appears to be the same root concern you're reporting for jdtls. Feel free to ignore if this doesn't address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 24, 2025):

It appears in the sidebar once it touches a file, can u show me your opencode.json

@rekram1-node commented on GitHub (Nov 24, 2025): It appears in the sidebar once it touches a file, can u show me your opencode.json
Author
Owner

@dehidehidehi commented on GitHub (Nov 25, 2025):

Thank you for the very quick answer.

Certainly, here is the opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "share": "disabled",
  "theme": "palenight",
  "autoupdate": false,
  "plugin": [
    "@tarquinen/opencode-dcp@0.3.5"
  ],
  "formatter": false,
  "experimental": {
    "batch_tool": true,
    "disable_paste_summary": false
  },
  "tools": {
    "task": false,
    "codesearch": true
  },
  "instructions": [
    "AGENTS.md",
    "~/.config/opencode/context/global/global-context.md",
    "~/.config/opencode/context/global/session-context.md"
  ],
  "permission": {
    "*": "allow",
   "bash": {
     "git *": "deny",
     "git blame*": "allow",
     "git clone*": "allow",
     "git diff*": "allow",
     "git log*": "allow",
     "git ls-files*": "allow",
     "git show*": "allow",
     "git status*": "allow"
   }
  },
  "lsp": {
    "jdtls": {
      "command": ["eclipse-jdt-ls", "--stdio"],
      "extensions": [".java"]
    },
    "basedpyright": {
      "command": ["basedpyright-langserver", "-p", "~/.config/.basedpyright-global.json", "--stdio"],
      "extensions": [".py"]
    },
    "pyright": {
      "disabled": true,
      "command": ["pyright", "-p", "~/.pyrightconfig-global.json --stdio"]
    },
    "vtsls": {
      "command": ["vtsls", "--stdio"],
      "extensions": [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"]
    },
    "typescript": {
      "command": ["typescript-language-server", "--stdio"],
      "disabled": true
    }
  },
  "keybinds": {
    "leader": "ctrl+x",
    "app_exit": "ctrl+c,<leader>q",
    "editor_open": "<leader>e",
    "theme_list": "<leader>t",
    "session_export": "<leader>x",
    "session_new": "<leader>n",
    "session_list": "<leader>l",
    "session_share": "<leader>s",
    "session_unshare": "none",
    "session_interrupt": "esc",
    "session_compact": "<leader>c",
    "session_child_cycle": "ctrl+p",
    "session_child_cycle_reverse": "ctrl+n",
    "messages_page_up": "ctrl+k",
    "messages_page_down": "ctrl+j",
    "messages_half_page_up": "ctrl+u",
    "messages_half_page_down": "ctrl+d",
    "messages_first": "ctrl+g",
    "messages_last": "ctrl+shift+g",
    "messages_copy": "<leader>y",
    "messages_undo": "<leader>u",
    "messages_redo": "<leader>r",
    "model_list": "<leader>m",
    "model_cycle_recent": "<leader>tab",
    "model_cycle_recent_reverse": "<leader>shift+tab",
    "agent_list": "<leader>a",
    "agent_cycle": "tab",
    "agent_cycle_reverse": "shift+tab",
    "input_clear": "ctrl+c",
    "input_paste": "ctrl+v",
    "input_submit": "enter",
    "input_newline": "shift+enter"
  }
}

And the eclipse-jdt-ls script which is on my $PATH is

#!/bin/sh
DIR=$(cd $(dirname $0); pwd)
LAUNCHER=$(ls $DIR/plugins/org.eclipse.equinox.launcher_*.jar)
java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dlog.protocol=true -Dlog.level=ALL -noverify -Xmx1G -javaagent:$DIR/lombok.jar -jar $LAUNCHER -configuration $DIR/config_linux -data $DIR/data

I've enabled logging at DEBUG level and can confirm the LSP does start:

|  Read     src/main/java/com/github/dehidehi/BlogApplication.java
INFO  2025-11-25T09:10:50 +6ms service=lsp serverID=jdtls spawned lsp server
INFO  2025-11-25T09:10:50 +1ms service=lsp.client serverID=jdtls starting client
INFO  2025-11-25T09:10:50 +3ms service=lsp.client serverID=jdtls sending initialize

Another example:

INFO  2025-11-25T09:10:54 +3ms service=lsp.client serverID=jdtls path=/home/kevco/Documents/Development/dp/com.github.dehidehi.vps/com.github.dehidehi.blog/src/main/java/com/github/dehidehi/BlogApplication.java textDocument/didOpen
INFO  2025-11-25T09:10:56 +1457ms service=lsp.client serverID=jdtls token=3d2eb62e-b22b-4c2f-af7a-d6639b114a69 window/workDoneProgress/create
INFO  2025-11-25T09:10:57 +1059ms service=lsp.client serverID=jdtls token=dced87e7-4936-4b24-bf52-fb2e31a8a24d window/workDoneProgress/create
INFO  2025-11-25T09:10:57 +1ms service=lsp.client serverID=jdtls token=7b168ccd-2fed-4ada-afb7-3c94a9142275 window/workDoneProgress/create
INFO  2025-11-25T09:10:57 +377ms service=lsp.client serverID=jdtls token=90e53c65-08dd-4d4d-8711-26d01db00139 window/workDoneProgress/create
INFO  2025-11-25T09:10:57 +9ms service=lsp.client serverID=jdtls token=94c4445b-5a3e-4243-8377-31bf84865d8a window/workDoneProgress/create
INFO  2025-11-25T09:10:57 +231ms service=lsp.client serverID=jdtls token=0671c745-9385-4feb-8c1f-ba7669b4686a window/workDoneProgress/create
INFO  2025-11-25T09:10:58 +1123ms service=lsp.client serverID=jdtls token=b22bac48-300e-4b28-8bc3-e261dbeaf997 window/workDoneProgress/create
INFO  2025-11-25T09:10:59 +106ms service=lsp.client serverID=jdtls token=11557f6d-7e8c-4ed6-b508-013fcd8758a6 window/workDoneProgress/create
INFO  2025-11-25T09:10:59 +549ms service=lsp.client serverID=jdtls token=ee74c370-e8e4-486f-bbaa-26486f6c1090 window/workDoneProgress/create
@dehidehidehi commented on GitHub (Nov 25, 2025): Thank you for the very quick answer. Certainly, here is the opencode.json ```json { "$schema": "https://opencode.ai/config.json", "share": "disabled", "theme": "palenight", "autoupdate": false, "plugin": [ "@tarquinen/opencode-dcp@0.3.5" ], "formatter": false, "experimental": { "batch_tool": true, "disable_paste_summary": false }, "tools": { "task": false, "codesearch": true }, "instructions": [ "AGENTS.md", "~/.config/opencode/context/global/global-context.md", "~/.config/opencode/context/global/session-context.md" ], "permission": { "*": "allow", "bash": { "git *": "deny", "git blame*": "allow", "git clone*": "allow", "git diff*": "allow", "git log*": "allow", "git ls-files*": "allow", "git show*": "allow", "git status*": "allow" } }, "lsp": { "jdtls": { "command": ["eclipse-jdt-ls", "--stdio"], "extensions": [".java"] }, "basedpyright": { "command": ["basedpyright-langserver", "-p", "~/.config/.basedpyright-global.json", "--stdio"], "extensions": [".py"] }, "pyright": { "disabled": true, "command": ["pyright", "-p", "~/.pyrightconfig-global.json --stdio"] }, "vtsls": { "command": ["vtsls", "--stdio"], "extensions": [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"] }, "typescript": { "command": ["typescript-language-server", "--stdio"], "disabled": true } }, "keybinds": { "leader": "ctrl+x", "app_exit": "ctrl+c,<leader>q", "editor_open": "<leader>e", "theme_list": "<leader>t", "session_export": "<leader>x", "session_new": "<leader>n", "session_list": "<leader>l", "session_share": "<leader>s", "session_unshare": "none", "session_interrupt": "esc", "session_compact": "<leader>c", "session_child_cycle": "ctrl+p", "session_child_cycle_reverse": "ctrl+n", "messages_page_up": "ctrl+k", "messages_page_down": "ctrl+j", "messages_half_page_up": "ctrl+u", "messages_half_page_down": "ctrl+d", "messages_first": "ctrl+g", "messages_last": "ctrl+shift+g", "messages_copy": "<leader>y", "messages_undo": "<leader>u", "messages_redo": "<leader>r", "model_list": "<leader>m", "model_cycle_recent": "<leader>tab", "model_cycle_recent_reverse": "<leader>shift+tab", "agent_list": "<leader>a", "agent_cycle": "tab", "agent_cycle_reverse": "shift+tab", "input_clear": "ctrl+c", "input_paste": "ctrl+v", "input_submit": "enter", "input_newline": "shift+enter" } } ``` And the eclipse-jdt-ls script which is on my $PATH is ```shell #!/bin/sh DIR=$(cd $(dirname $0); pwd) LAUNCHER=$(ls $DIR/plugins/org.eclipse.equinox.launcher_*.jar) java -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dlog.protocol=true -Dlog.level=ALL -noverify -Xmx1G -javaagent:$DIR/lombok.jar -jar $LAUNCHER -configuration $DIR/config_linux -data $DIR/data ``` I've enabled logging at DEBUG level and can confirm the LSP does start: ```text | Read src/main/java/com/github/dehidehi/BlogApplication.java INFO 2025-11-25T09:10:50 +6ms service=lsp serverID=jdtls spawned lsp server INFO 2025-11-25T09:10:50 +1ms service=lsp.client serverID=jdtls starting client INFO 2025-11-25T09:10:50 +3ms service=lsp.client serverID=jdtls sending initialize ``` Another example: ```text INFO 2025-11-25T09:10:54 +3ms service=lsp.client serverID=jdtls path=/home/kevco/Documents/Development/dp/com.github.dehidehi.vps/com.github.dehidehi.blog/src/main/java/com/github/dehidehi/BlogApplication.java textDocument/didOpen INFO 2025-11-25T09:10:56 +1457ms service=lsp.client serverID=jdtls token=3d2eb62e-b22b-4c2f-af7a-d6639b114a69 window/workDoneProgress/create INFO 2025-11-25T09:10:57 +1059ms service=lsp.client serverID=jdtls token=dced87e7-4936-4b24-bf52-fb2e31a8a24d window/workDoneProgress/create INFO 2025-11-25T09:10:57 +1ms service=lsp.client serverID=jdtls token=7b168ccd-2fed-4ada-afb7-3c94a9142275 window/workDoneProgress/create INFO 2025-11-25T09:10:57 +377ms service=lsp.client serverID=jdtls token=90e53c65-08dd-4d4d-8711-26d01db00139 window/workDoneProgress/create INFO 2025-11-25T09:10:57 +9ms service=lsp.client serverID=jdtls token=94c4445b-5a3e-4243-8377-31bf84865d8a window/workDoneProgress/create INFO 2025-11-25T09:10:57 +231ms service=lsp.client serverID=jdtls token=0671c745-9385-4feb-8c1f-ba7669b4686a window/workDoneProgress/create INFO 2025-11-25T09:10:58 +1123ms service=lsp.client serverID=jdtls token=b22bac48-300e-4b28-8bc3-e261dbeaf997 window/workDoneProgress/create INFO 2025-11-25T09:10:59 +106ms service=lsp.client serverID=jdtls token=11557f6d-7e8c-4ed6-b508-013fcd8758a6 window/workDoneProgress/create INFO 2025-11-25T09:10:59 +549ms service=lsp.client serverID=jdtls token=ee74c370-e8e4-486f-bbaa-26486f6c1090 window/workDoneProgress/create ```
Author
Owner

@dehidehidehi commented on GitHub (Nov 25, 2025):

On occasion I do see start-up timeouts from the Java LSP; it is true that the start time is longer than other LSPs in general:

ERROR 2025-11-25T10:38:11 +1ms service=lsp error=LSPInitializeError Caused by: Operation timed out after 5000ms Failed to initialize LSP client jdtls
@dehidehidehi commented on GitHub (Nov 25, 2025): On occasion I do see start-up timeouts from the Java LSP; it is true that the start time is longer than other LSPs in general: ```text ERROR 2025-11-25T10:38:11 +1ms service=lsp error=LSPInitializeError Caused by: Operation timed out after 5000ms Failed to initialize LSP client jdtls ```
Author
Owner

@rekram1-node commented on GitHub (Nov 26, 2025):

Hmm interesting, im surprised it wont appear in the sidebar...

@rekram1-node commented on GitHub (Nov 26, 2025): Hmm interesting, im surprised it wont appear in the sidebar...
Author
Owner

@sincebyte commented on GitHub (Jan 13, 2026):

➜ skytech git:(dev) opencode --print-logs --log-level DEBUG debug lsp diagnostics ./skytech-app/src/main/java/com/skytech/SampleApplication.java
I'm using this command everything works well。
but when use opencode ,mcp server do not work.

Image
@sincebyte commented on GitHub (Jan 13, 2026): ➜ skytech git:(dev) opencode --print-logs --log-level DEBUG debug lsp diagnostics ./skytech-app/src/main/java/com/skytech/SampleApplication.java I'm using this command everything works well。 but when use opencode ,mcp server do not work. <img width="2032" height="1161" alt="Image" src="https://github.com/user-attachments/assets/1b92ded7-2429-49cb-bec7-462184d1bacb" />
Author
Owner

@rekram1-node commented on GitHub (Jan 13, 2026):

im not following how are mcp servers relevant here

@rekram1-node commented on GitHub (Jan 13, 2026): im not following how are mcp servers relevant here
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3095