Repository navigation
fix(java): discover JDKs in the standard Windows and Linux locations - #17
Merged
Merged
Conversation
The JDK tool definition declared discovery scans for macOS only, so on Windows and Linux no JDK was ever an installation: New Project's JDK picker said no version was installed (1lck/Lithe-IDEA#2032) although runs found one through JAVA_HOME or the PATH. - Windows: C:\Program Files\Java, Eclipse Adoptium, Microsoft (jdk-*), Zulu, Amazon Corretto and BellSoft. - Linux: /usr/lib/jvm. - Windows and Linux: ~/.jdks (JDKs IntelliJ IDEA downloads). - macOS and Linux: ~/.sdkman/candidates/java. Discovery roots are absolute paths because Core only accepts upper-case environment variable names, and Windows spells this one ProgramFiles. A JDK anywhere else is still listed through JAVA_HOME or the PATH (Lithe-core-rust#67). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue:1lck/Lithe-IDEA#2032
问题
java工具定义的discovery只声明了 macOS 的两个目录(/Library/Java/JavaVirtualMachines和~/Library/Java/JavaVirtualMachines),所以 Windows 和 Linux 上永远没有扫描到的 JDK。新建项目的 JDK 选择器因此显示"未找到已安装的版本。此项必填。",但运行时通过JAVA_HOME或 PATH 其实能找到 JDK。改动(只改
plugin.json的discovery)C:\Program Files\Java\*、Eclipse Adoptium\*、Microsoft\jdk-*、Zulu\*、Amazon Corretto\*、BellSoft\*/usr/lib/jvm/*~/.jdks/*(IntelliJ IDEA 下载的 JDK)~/.sdkman/candidates/java/*ProgramFiles环境变量,是因为 Core 只接受全大写的环境变量名。D:\Program Files\Java\Temurin\jdk-*)由宿主侧的修复覆盖:Core 把JAVA_HOME和 PATH 上的 JDK 也列为可选安装,见 Lithe-core-rust#67。验证
plugin.json,平台设为 Linux。~/.jdks/jdk-21和~/.sdkman/candidates/java/17.0.9-tem都被列为host:system安装,manifest 通过 Core 校验。C:\Program Files\...扫描还没在 Windows 实机验证,等宿主 PR 能构建出 Windows 版后补测。🤖 Generated with Claude Code