java lsp jdtls set --java-executable not valid #8990

Closed
opened 2026-02-16 18:11:20 -05:00 by yindo · 2 comments
Owner

Originally created by @wangning182 on GitHub (Feb 10, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

1、opencode.json
"lsp": { "java": { "command": [ "jdtls", "--java-executable=/Users/xx/.local/share/mise/installs/java/openjdk-21/bin/java", "--jvm-arg=-javaagent:/Users/xx/code/app/lombok-1.18.42.jar" ], "extensions": [ ".java" ] },

⚙ lsp_diagnostics [filePath=./src/test/java/com/interview/controller/employer/CandidateControllerTest.java]
Error: Error: LSP request timeout (method: initialize)
recent stderr: Traceback (most recent call last):
File "/opt/homebrew/Cellar/jdtls/1.56.0/libexec/bin/jdtls", line 26, in
jdtls.main(sys.argv[1:])
~~~~~~~~~~^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/jdtls/1.56.0/libexec/bin/jdtls.py", line 105, in main
java_executable = get_java_executable(known_args)
File "/opt/homebrew/Cellar/jdtls/1.56.0/libexec/bin/jdtls.py", line 40, in get_java_executable
raise Exception("jdtls requires at least Java 21")
Exception: jdtls requires at least Java 21

2、lombok config is also not valid
3、jdtls installed by brew

Plugins

oh-my-opencode

OpenCode version

1.1.53

Steps to reproduce

1、set java lsp in opencode.json
2、run opencode
3、tell ai try java lsp in any java test faile

Screenshot and/or share link

No response

Operating System

macos 26

Terminal

item2

Originally created by @wangning182 on GitHub (Feb 10, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description 1、opencode.json ` "lsp": { "java": { "command": [ "jdtls", "--java-executable=/Users/xx/.local/share/mise/installs/java/openjdk-21/bin/java", "--jvm-arg=-javaagent:/Users/xx/code/app/lombok-1.18.42.jar" ], "extensions": [ ".java" ] }, ` ⚙ lsp_diagnostics [filePath=./src/test/java/com/interview/controller/employer/CandidateControllerTest.java] Error: Error: LSP request timeout (method: initialize) recent stderr: Traceback (most recent call last): File "/opt/homebrew/Cellar/jdtls/1.56.0/libexec/bin/jdtls", line 26, in <module> jdtls.main(sys.argv[1:]) ~~~~~~~~~~^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/jdtls/1.56.0/libexec/bin/jdtls.py", line 105, in main java_executable = get_java_executable(known_args) File "/opt/homebrew/Cellar/jdtls/1.56.0/libexec/bin/jdtls.py", line 40, in get_java_executable raise Exception("jdtls requires at least Java 21") Exception: jdtls requires at least Java 21 2、lombok config is also not valid 3、jdtls installed by brew ### Plugins oh-my-opencode ### OpenCode version 1.1.53 ### Steps to reproduce 1、set java lsp in opencode.json 2、run opencode 3、tell ai try java lsp in any java test faile ### Screenshot and/or share link _No response_ ### Operating System macos 26 ### Terminal item2
yindo added the bugneeds:compliance labels 2026-02-16 18:11:20 -05:00
yindo closed this issue 2026-02-16 18:11:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 10, 2026):

This issue doesn't fully meet our contributing guidelines.

What needs to be fixed:

  • The "Steps to reproduce" field is empty. For bug reports, please provide clear steps that reproduce the issue. For example: what files did you open, what commands did you run, what actions triggered the error, etc.

Please edit this issue to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions[bot] commented on GitHub (Feb 10, 2026): <!-- issue-compliance --> This issue doesn't fully meet our [contributing guidelines](https://github.com/anomalyco/opencode/blob/dev/CONTRIBUTING.md). **What needs to be fixed:** - The "Steps to reproduce" field is empty. For bug reports, please provide clear steps that reproduce the issue. For example: what files did you open, what commands did you run, what actions triggered the error, etc. Please edit this issue to address the above within **2 hours**, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 10, 2026):

This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new issue that follows our issue templates.

@github-actions[bot] commented on GitHub (Feb 10, 2026): This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window. Feel free to open a new issue that follows our issue templates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8990