-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The Java version detection for JDTLS fails when java -version outputs only the major version (e.g., "21") without minor/patch numbers. The regex
opencode/packages/opencode/src/lsp/server.ts
Line 1144 in af06175
| const m = /"(\d+)\.\d+\.\d+"/.exec(stderr.toString()) |
expects a format like "21.0.0", causing the automatic JDTLS installation to fail with the error "JDTLS requires at least Java 21" even though Java 21 is installed:
openjdk version "21" 2023-09-19 LTS
OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS)
OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode)Plugins
No response
OpenCode version
1.1.51
Steps to reproduce
- Install Java 21 (e.g., Temurin-21+35) where
java -versionoutputs "21" instead of "21.0.x" - Open a Java project with opencode
- JDTLS fails to install with error "JDTLS requires at least Java 21"
Screenshot and/or share link
No response
Operating System
macOS 26.2
Terminal
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working