René's URL Explorer Experiment


Title: [Bug] jdtls-runtime 优先命中 PATH 旧版 java,且复用 redhat.java 的 JDT LS 1.63(需 Java 25)时用 JDK 21 启动崩溃退出 · Issue #27 · Lithe-IDEA/lithe-plugin-java · GitHub

Open Graph Title: [Bug] jdtls-runtime 优先命中 PATH 旧版 java,且复用 redhat.java 的 JDT LS 1.63(需 Java 25)时用 JDK 21 启动崩溃退出 · Issue #27 · Lithe-IDEA/lithe-plugin-java

X Title: [Bug] jdtls-runtime 优先命中 PATH 旧版 java,且复用 redhat.java 的 JDT LS 1.63(需 Java 25)时用 JDK 21 启动崩溃退出 · Issue #27 · Lithe-IDEA/lithe-plugin-java

Description: Platform / 平台 Windows Area / 模块 Language support / 语言服务 Lithe version / Lithe 版本 Lithe Desktop 0.8.1 + Java Support v3.0.1(Windows / macOS / Linux 均受影响) Priority / 优先级 P0 / 立即处理:已严重影响使用体验,核心流程受阻或无法正常使用 OS and architecture / 操作系统与架构 Windo...

Open Graph Description: Platform / 平台 Windows Area / 模块 Language support / 语言服务 Lithe version / Lithe 版本 Lithe Desktop 0.8.1 + Java Support v3.0.1(Windows / macOS / Linux 均受影响) Priority / 优先级 P0 / 立即处理:已严重影响使用体验,核心流程受阻或无法...

X Description: Platform / 平台 Windows Area / 模块 Language support / 语言服务 Lithe version / Lithe 版本 Lithe Desktop 0.8.1 + Java Support v3.0.1(Windows / macOS / Linux 均受影响) Priority / 优先级 P0 / 立即处理:已严重影响使用体验,核心流程受阻或无法...

Opengraph URL: https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug] jdtls-runtime 优先命中 PATH 旧版 java,且复用 redhat.java 的 JDT LS 1.63(需 Java 25)时用 JDK 21 启动崩溃退出","articleBody":"### Platform / 平台\n\nWindows\n\n### Area / 模块\n\nLanguage support / 语言服务\n\n### Lithe version / Lithe 版本\n\nLithe Desktop 0.8.1 + Java Support v3.0.1(Windows / macOS / Linux 均受影响)\n\n### Priority / 优先级\n\nP0 / 立即处理:已严重影响使用体验,核心流程受阻或无法正常使用\n\n### OS and architecture / 操作系统与架构\n\nWindows 10.0.26200 (amd64)(实测 macOS arm64 同样复现)\n\n### Environment / 环境信息\n\n- **插件版本**:`io.github.lithe-idea.java-support` `v3.0.0` / `v3.0.1`(自 #18 起改为使用本机 JDT LS 与 `jdtls-runtime` 工具)\n- **项目 JDK(`java` 工具)与系统 `PATH` 默认 `java`**:Java 8(`1.8.0_301`)\n- **语言服务器启动 JDK(`jdtls-runtime` / `JDK for JDT LS`)**:\n  - 阶段一(默认自动选择):命中 `PATH` 上的 Java 8(`1.8.0_301`)\n  - 阶段二(按报错提示改为 JDK 21):Java 21\n- **本机自动发现的 JDT LS**:VS Code `redhat.java` 扩展自带的 `server/`(如 `redhat.java-1.58.0` 内置的 JDT LS `1.63.0.202610161533`)\n\n### Steps to reproduce / 复现步骤\n\n1. 在电脑上安装 Java 8(配置在系统 `PATH` 中)以及更高版本的 JDK(如 JDK 21),并安装有 VS Code `redhat.java` 扩展(如 `1.58.0`,内置 JDT LS `1.63.0`)。\n2. 将 Java Support 插件升级到 `v3.0.1`,打开任意 Java 项目。\n3. **现象一**:未手动配置 `JDK for JDT LS` 时,`jdtls-runtime` 优先命中了 `PATH` 上的 Java 8,触发 `launch.runtime_too_old`,报错提示用户:\n   `The Eclipse JDT Language Server needs Java 21 or later, but the JDK chosen for it is older. Choose a JDK 21 or later for \"JDK for JDT LS\" in Settings > Build, Execution, Deployment > Toolchains.`\n4. **现象二**:按报错提示在「设置 → 构建、执行、部署 → 工具链」将 `JDK for JDT LS` 设为 **JDK 21** 后重新打开项目:\n   - `java.resolveLaunch` 检查通过(`21 >= 21`),并定位到 `redhat.java` 扩展下的 JDT LS `1.63.0`;\n   - 宿主启动 JDT LS 进程约 4 秒后,Equinox 因核心 bundle 要求 `JavaSE-25` 解析失败而直接以退出码 `13` 退出,宿主报 `code=\"host.exitedEarly\"` / `code=\"serverExited\"`,语言服务依然无法启动。\n\n### Expected behavior / 预期行为\n\n1. **自动选择最高版本已安装 JDK,不被 `PATH` 上的旧版 `java` 抢占**:\n   - 如 `docs/releases/v3.0.0.md` 所承诺(“不选时自动使用找到的最高版本 JDK”),`plugin.json` 中 `jdtls-runtime` 的 `executables` 应优先使用自动扫描到的已安装最高版本 JDK(`detected`,`kind: \"toolchain\", scope: \"installed\"`),而不是把 `shell`(`kind: \"command\", command: \"java\"`)排在 `detected` 前面导致日常 Java 8/17 开发环境的 `PATH` 抢占 `jdtls-runtime`。\n2. **复用编辑器扩展自带 JDT LS 时,支持发现其配套的 JRE**:\n   - VS Code / Cursor 的 `redhat.java-*` 扩展在 `server/` 旁自带了匹配当前 JDT LS 版本的运行时(`~/.vscode/extensions/redhat.java-*/jre/\u003cversion>/`)。`jdtls-runtime` 的发现规则或启动解析应能识别该运行时,避免借用了要求 Java 25 的 `redhat.java` JDT LS 却找不到对应的 Java 25 运行时。\n3. **按目标 JDT LS 实际要求的最低 Java 版本校验 `jdtls-runtime`**:\n   - JDT LS `1.61.0` 的 `org.eclipse.core.filesystem_1.11.500` 声明 `Bundle-RequiredExecutionEnvironment: JavaSE-17`(运行需 Java 21+),但 JDT LS `1.63.0`(如 `redhat.java-1.58.0`)中的 `org.eclipse.core.filesystem_1.12.0.v20260927-0940` 已升级为 **`Bundle-RequiredExecutionEnvironment: JavaSE-25`**。\n   - `check_server_runtime` 不应只硬编码 `MINIMUM_SERVER_JAVA_VERSION = 21`,而应结合目标 JDT LS 安装包要求的 Java 版本检查 `jdtls-runtime`;当用户选择的 JDK(如 JDK 21)低于目标 JDT LS 要求的版本(如 Java 25)时,在 `java.resolveLaunch` 阶段直接返回明确错误码与所需版本号,而不是放行后让 Equinox 启动 4 秒后以退出码 `13` 崩溃。\n\n### Actual behavior / 实际行为\n\n1. `io.github.lithe-idea.java-support/plugin.json`(第 298–320 行)中 `jdtls-runtime` 的 `executables` 顺序为 `default` → `global-request` → `shell` → `detected`,导致只要 `PATH` 上是 Java 8/11/17,`detected` 就永远不会被用到。\n2. 用户按提示将 `JDK for JDT LS` 改为 JDK 21 后,`check_server_runtime`(硬编码 `MINIMUM_SERVER_JAVA_VERSION = 21`)放行,但自动发现的 `redhat.java` JDT LS `1.63.0` 要求 `JavaSE-25`,进程启动 4.3 秒后因 OSGi bundle 无法解析而直接退出(`host.exitedEarly`)。\n\n### Logs or diagnostic output / 日志或诊断输出\n\n```shell\n# 1. Lithe 诊断日志(plugins/io.github.lithe-idea.java-support/host.log & lsp/*.log)\n2026-11-17T06:39:29.890Z INFO seq=41 event=plugins.operation.finished op=host-call-1 msg=\"Plugin operation finished\" duration_ms=415 operation=java.resolveLaunch plugin=io.github.lithe-idea.java-support\n2026-11-17T06:39:38.384Z INFO seq=74 event=lsp.process.started msg=\"Language service process started for server invalid-fa2bed2161954417597454e752c9ee70\" server=invalid-fa2bed2161954417597454e752c9ee70\n2026-11-17T06:39:42.683Z ERROR seq=75 event=plugins.operation.failed op=action-1 msg=\"Plugin operation failed\" code=host.exitedEarly duration_ms=16136 operation=languageServer/start plugin=io.github.lithe-idea.java-support\n2026-11-17T06:39:42.684Z ERROR seq=76 event=lsp.session.failed msg=\"Engine session failed\" code=serverExited server=invalid-fa2bed2161954417597454e752c9ee70 state=failed\n\n# 2. 用 JDK 21 启动 redhat.java (JDT LS 1.63.0) 时的 Equinox jdt.log 报错(Exit code 13)\n!ENTRY org.eclipse.buildship.core 4 0 2026-11-16 22:55:28.296\n!MESSAGE FrameworkEvent ERROR\n!STACK 0\norg.osgi.framework.BundleException: Could not resolve module: org.eclipse.buildship.core [22]\n  Unresolved requirement: Require-Bundle: org.eclipse.jdt.core\n    -> Bundle-SymbolicName: org.eclipse.jdt.core; bundle-version=\"3.48.0.v20261007-1246\"; singleton:=\"true\"\n       org.eclipse.jdt.core [49]\n         Unresolved requirement: Require-Bundle: org.eclipse.core.resources; bundle-version=\"[3.22.0,4.0.0)\"\n           -> Bundle-SymbolicName: org.eclipse.core.resources; bundle-version=\"3.25.0.v20261010-1447\"; singleton:=\"true\"\n              org.eclipse.core.resources [31]\n                Unresolved requirement: Require-Bundle: org.eclipse.core.filesystem; bundle-version=\"[1.11.0,2.0.0)\"\n                  -> Bundle-SymbolicName: org.eclipse.core.filesystem; bundle-version=\"1.12.0.v20260927-0940\"; singleton:=\"true\"\n                     org.eclipse.core.filesystem [28]\n                       Unresolved requirement: Require-Capability: osgi.ee; filter:=\"(&(osgi.ee=JavaSE)(version=25))\"\n```\n\n### Screenshots or recordings / 截图或录屏\n\n未提供(已由上方脱敏诊断日志与 Equinox 堆栈完整覆盖)。\n\n### Checklist / 提交前检查\n\n- [x] I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。\n- [x] I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。\n","author":{"url":"https://github.com/1lck","@type":"Person","name":"1lck"},"datePublished":"2026-11-17T07:01:52Z","url":"https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1a1fe17c-430a-35ec-49c7-6befe9f18421
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD9B6:15F7F4:3F8DC55:557A1BA:6B070DFE
html-safe-nonce2be2af54767e4f9d0a95fcfdacedc368f5544d5407b932783c21477d75ddc3c3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUI2OjE1RjdGNDozRjhEQzU1OjU1N0ExQkE6NkIwNzBERkUiLCJ2aXNpdG9yX2lkIjoiNzM1ODU2NDA2ODQxODMyNjAxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac139a098c34823794d74106db28fc99a1af0cfa9a31933ca3fcecd960f5977109
hovercard-subject-tagissue:6439300306
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Lithe-IDEA/lithe-plugin-java/27/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bb495dd8468f5ecdc011a0127c735f899e22da99606a690ef756202f25b9ca56/Lithe-IDEA/lithe-plugin-java/issues/27
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bb495dd8468f5ecdc011a0127c735f899e22da99606a690ef756202f25b9ca56/Lithe-IDEA/lithe-plugin-java/issues/27
og:image:altPlatform / 平台 Windows Area / 模块 Language support / 语言服务 Lithe version / Lithe 版本 Lithe Desktop 0.8.1 + Java Support v3.0.1(Windows / macOS / Linux 均受影响) Priority / 优先级 P0 / 立即处理:已严重影响使用体验,核心流程受阻或无法...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:username1lck
hostnamegithub.com
expected-hostnamegithub.com
None9aaa1abe1aaef39a8543ab08df7a776c3243275815d741d29afa7b02148ca05e
turbo-cache-controlno-preview
go-importgithub.com/Lithe-IDEA/lithe-plugin-java git https://github.com/Lithe-IDEA/lithe-plugin-java.git
octolytics-dimension-user_id340144206
octolytics-dimension-user_loginLithe-IDEA
octolytics-dimension-repository_id1446370282
octolytics-dimension-repository_nwoLithe-IDEA/lithe-plugin-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1446370282
octolytics-dimension-repository_network_root_nwoLithe-IDEA/lithe-plugin-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c43783771de038e2c401dd343799000e8d1253
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/27#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2Flithe-plugin-java%2Fissues%2F27
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLithe-IDEA%2Flithe-plugin-java%2Fissues%2F27
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Lithe-IDEA%2Flithe-plugin-java
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/27
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/27
Reloadhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues/27
Lithe-IDEAhttps://github.com/Lithe-IDEA
lithe-plugin-javahttps://github.com/Lithe-IDEA/lithe-plugin-java
Codehttps://github.com/Lithe-IDEA/lithe-plugin-java
Issues3 (3)https://github.com/Lithe-IDEA/lithe-plugin-java/issues
Pull requests1 (1)https://github.com/Lithe-IDEA/lithe-plugin-java/pulls
Actionshttps://github.com/Lithe-IDEA/lithe-plugin-java/actions
Projectshttps://github.com/Lithe-IDEA/lithe-plugin-java/projects
Security and qualityhttps://github.com/Lithe-IDEA/lithe-plugin-java/security
Insightshttps://github.com/Lithe-IDEA/lithe-plugin-java/insights
https://github.com/Lithe-IDEA/lithe-plugin-java
New issuehttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27
New issuehttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27
#29https://github.com/Lithe-IDEA/lithe-plugin-java/pull/29
[Bug] jdtls-runtime 优先命中 PATH 旧版 java,且复用 redhat.java 的 JDT LS 1.63(需 Java 25)时用 JDK 21 启动崩溃退出https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27#top
#29https://github.com/Lithe-IDEA/lithe-plugin-java/pull/29
bughttps://github.com/Lithe-IDEA/lithe-plugin-java/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/1lck
1lckhttps://github.com/1lck
on Nov 17, 2026https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27#issue-6439300306
feat!: 使用用户自装的 JDT LS,插件包不再附带语言服务器和 JDK #18https://github.com/Lithe-IDEA/lithe-plugin-java/pull/18
1lckhttps://github.com/1lck
bughttps://github.com/Lithe-IDEA/lithe-plugin-java/issues?q=state%3Aopen%20label%3A%22bug%22
on Nov 17, 2026https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27#event-36374796999
1lckhttps://github.com/1lck
completedhttps://github.com/Lithe-IDEA/lithe-plugin-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#29https://github.com/Lithe-IDEA/lithe-plugin-java/pull/29
on Nov 17, 2026https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27#event-36377664769
Sign up for freehttps://github.com/signup?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27
Sign in to commenthttps://github.com/login?return_to=https://github.com/Lithe-IDEA/lithe-plugin-java/issues/27
bughttps://github.com/Lithe-IDEA/lithe-plugin-java/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.