anomalyco / anomalyco/opencode

[BUG]: RHEL 10.2 OpenJDK update breaks Java LSP activation

Open
#45,569 2 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Aug 27, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

A recent release of patches for OpenJDK 25 on Red Hat Enterprise Linux 10.2 systems modifies the version information produced by "java -version" into a non-semver-compliant structure:

java -version
openjdk version "25.0.4.1" 2026-08-18 LTS
OpenJDK Runtime Environment (Red_Hat-25.0.4.1.1-1) (build 25.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-25.0.4.1.1-1) (build 25.0.4.1+1-LTS, mixed mode, sharing)

This breaks the version detection at https://github.com/anomalyco/opencode/blob/c2eacd72afc4a4984564c393e15ab30011057269/packages/opencode/src/lsp/server.ts#L1193

which ultimately results in an early exit of the activation function.

Possible fix:

- const m = /"(\d+)\.\d+\.\d+"/.exec(result.stderr.toString())
+ const m = /"(\d+)(?:\.\d+)*"/.exec(result.stderr.toString())
Plugins

None

OpenCode version

1.18.23

Steps to reproduce
  1. Use a version of Java with a 4 digit version string.
  2. Use opencode to inspect/interact with Java files
  3. Notice that the jdtls LSP does not activate, even if already previously downloaded and installed
Screenshot and/or share link

N/A

Operating System

RHEL 10.2

Terminal

bash 5.2.26

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.