jdtls lsp server does not work properly in a window environment. #4397

Closed
opened 2026-02-16 17:43:40 -05:00 by yindo · 3 comments
Owner

Originally created by @crinity-khg on GitHub (Jan 7, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

About the java code in opencode
The jdtls lsp server is not working properly in a window environment.

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

대강 이런 명령어로 터미널에서 테스트하면
INFO 2026-01-08T00:59:42 +29ms service=vcs branch=master initialized
INFO 2026-01-08T00:59:42 +0ms service=bus type=file.watcher.updated subscribing
INFO 2026-01-08T00:59:42 +211ms service=lsp serverID=jdtls spawned lsp server
INFO 2026-01-08T00:59:42 +1ms service=lsp.client serverID=jdtls starting client
INFO 2026-01-08T00:59:42 +4ms service=lsp.client serverID=jdtls sending initialize
INFO 2026-01-08T00:59:48 +6086ms service=lsp.client serverID=jdtls token=a524a6df-c9b6-483b-ba24-a8b9ffec4630 window/workDoneProgress/create
INFO 2026-01-08T00:59:48 +14ms service=lsp.client serverID=jdtls token=4da7ef09-5252-4fc3-911a-8ef74aa539d8 window/workDoneProgress/create
INFO 2026-01-08T00:59:48 +17ms service=lsp.client serverID=jdtls initialized
INFO 2026-01-08T00:59:48 +1ms service=bus type=lsp.updated publishing
INFO 2026-01-08T00:59:48 +2ms service=lsp.client serverID=jdtls path=C:\Users\crinity\intellijProject\drive-service\src\main\java\com\crinity\drive\common\dto\PageableRequest.java waiting for diagnostics
INFO 2026-01-08T00:59:48 +0ms service=bus type=lsp.client.diagnostics subscribing
INFO 2026-01-08T00:59:48 +11ms service=lsp.client serverID=jdtls path=C:\Users\crinity\intellijProject\drive-service\src\main\java\com\crinity\drive\common\dto\PageableRequest.java workspace/didChangeWatchedFiles
INFO 2026-01-08T00:59:48 +0ms service=lsp.client serverID=jdtls path=C:\Users\crinity\intellijProject\drive-service\src\main\java\com\crinity\drive\common\dto\PageableRequest.java textDocument/didOpen
INFO 2026-01-08T00:59:48 +74ms service=lsp.client serverID=jdtls token=0584183c-00ac-4e27-bbe4-44b2f9bb1886 window/workDoneProgress/create
INFO 2026-01-08T00:59:48 +1ms service=lsp.client serverID=jdtls token=8ea0b10f-290e-46f7-ab70-ba83edf2839e window/workDoneProgress/create
INFO 2026-01-08T00:59:48 +16ms service=lsp.client serverID=jdtls token=ad84e24c-4c46-42fc-8133-6d357653056b window/workDoneProgress/create
INFO 2026-01-08T00:59:51 +2910ms service=bus type=lsp.client.diagnostics unsubscribing
{}
INFO 2026-01-08T00:59:52 +1015ms service=default directory=C:\Users\crinity\intellijProject\drive-service disposing instance
INFO 2026-01-08T00:59:52 +1ms service=state key=C:\Users\crinity\intellijProject\drive-service waiting for state disposal to complete

I think it works well if you look at the log here
If you approach the actual opencode and test the lsp server functionality
Error: LSP server 'jdtls' is configured but NOT INSTALLED This error has occurred and the lsp server function is not available

This phenomenon is located in the lsp area on the right
If jdtls is shown to be enabled, it will happen the same.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @crinity-khg on GitHub (Jan 7, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description About the java code in opencode The jdtls lsp server is not working properly in a window environment. opencode --print-logs --log-level DEBUG debug lsp diagnostics .~~~.java 대강 이런 명령어로 터미널에서 테스트하면 INFO 2026-01-08T00:59:42 +29ms service=vcs branch=master initialized INFO 2026-01-08T00:59:42 +0ms service=bus type=file.watcher.updated subscribing INFO 2026-01-08T00:59:42 +211ms service=lsp serverID=jdtls spawned lsp server INFO 2026-01-08T00:59:42 +1ms service=lsp.client serverID=jdtls starting client INFO 2026-01-08T00:59:42 +4ms service=lsp.client serverID=jdtls sending initialize INFO 2026-01-08T00:59:48 +6086ms service=lsp.client serverID=jdtls token=a524a6df-c9b6-483b-ba24-a8b9ffec4630 window/workDoneProgress/create INFO 2026-01-08T00:59:48 +14ms service=lsp.client serverID=jdtls token=4da7ef09-5252-4fc3-911a-8ef74aa539d8 window/workDoneProgress/create INFO 2026-01-08T00:59:48 +17ms service=lsp.client serverID=jdtls initialized INFO 2026-01-08T00:59:48 +1ms service=bus type=lsp.updated publishing INFO 2026-01-08T00:59:48 +2ms service=lsp.client serverID=jdtls path=C:\Users\crinity\intellijProject\drive-service\src\main\java\com\crinity\drive\common\dto\PageableRequest.java waiting for diagnostics INFO 2026-01-08T00:59:48 +0ms service=bus type=lsp.client.diagnostics subscribing INFO 2026-01-08T00:59:48 +11ms service=lsp.client serverID=jdtls path=C:\Users\crinity\intellijProject\drive-service\src\main\java\com\crinity\drive\common\dto\PageableRequest.java workspace/didChangeWatchedFiles INFO 2026-01-08T00:59:48 +0ms service=lsp.client serverID=jdtls path=C:\Users\crinity\intellijProject\drive-service\src\main\java\com\crinity\drive\common\dto\PageableRequest.java textDocument/didOpen INFO 2026-01-08T00:59:48 +74ms service=lsp.client serverID=jdtls token=0584183c-00ac-4e27-bbe4-44b2f9bb1886 window/workDoneProgress/create INFO 2026-01-08T00:59:48 +1ms service=lsp.client serverID=jdtls token=8ea0b10f-290e-46f7-ab70-ba83edf2839e window/workDoneProgress/create INFO 2026-01-08T00:59:48 +16ms service=lsp.client serverID=jdtls token=ad84e24c-4c46-42fc-8133-6d357653056b window/workDoneProgress/create INFO 2026-01-08T00:59:51 +2910ms service=bus type=lsp.client.diagnostics unsubscribing {} INFO 2026-01-08T00:59:52 +1015ms service=default directory=C:\Users\crinity\intellijProject\drive-service disposing instance INFO 2026-01-08T00:59:52 +1ms service=state key=C:\Users\crinity\intellijProject\drive-service waiting for state disposal to complete I think it works well if you look at the log here If you approach the actual opencode and test the lsp server functionality Error: LSP server 'jdtls' is configured but NOT INSTALLED This error has occurred and the lsp server function is not available This phenomenon is located in the lsp area on the right If jdtls is shown to be enabled, it will happen the same. ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the windowsbug labels 2026-02-16 17:43:40 -05:00
yindo closed this issue 2026-02-16 17:43:40 -05:00
Author
Owner

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

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

  • #6861: Dart LSP fails on Windows: 'Command not found' despite dart being in PATH (similar Windows LSP spawn issue)
  • #6365: ESLint LSP server fails to auto-install on Windows (same error message pattern on Windows)
  • #4703: LSP - Java - eclipse-jdt-ls won't appear in the right hand side of the CLI TUI when enabled (jdtls display issue)

These issues suggest there may be a systemic problem with how LSP servers are spawned on Windows, potentially related to:

  1. Incorrect command resolution on Windows (missing .cmd extensions)
  2. Shell spawning issues on Windows platforms
  3. Configuration command override not being respected during availability checks

Feel free to ignore if your specific case involves unique circumstances or if you've already verified these other issues.

@github-actions[bot] commented on GitHub (Jan 7, 2026): This issue might be a duplicate of existing Windows LSP issues. Please check: - #6861: Dart LSP fails on Windows: 'Command not found' despite dart being in PATH (similar Windows LSP spawn issue) - #6365: ESLint LSP server fails to auto-install on Windows (same error message pattern on Windows) - #4703: LSP - Java - eclipse-jdt-ls won't appear in the right hand side of the CLI TUI when enabled (jdtls display issue) These issues suggest there may be a systemic problem with how LSP servers are spawned on Windows, potentially related to: 1. Incorrect command resolution on Windows (missing .cmd extensions) 2. Shell spawning issues on Windows platforms 3. Configuration command override not being respected during availability checks Feel free to ignore if your specific case involves unique circumstances or if you've already verified these other issues.
Author
Owner

@somehow-paul commented on GitHub (Jan 8, 2026):

I'm having the same problem—Java's LSP service isn't working, and I've been looking into it for two days.

@somehow-paul commented on GitHub (Jan 8, 2026): I'm having the same problem—Java's LSP service isn't working, and I've been looking into it for two days.
Author
Owner

@milo-container commented on GitHub (Jan 12, 2026):

same proble

@milo-container commented on GitHub (Jan 12, 2026): same proble
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4397