Skip to content

fix(spawn-local-jdk): recognize and launch Windows JDK homes#51

Merged
deer merged 1 commit into
mainfrom
better_windows_support
Jul 15, 2026
Merged

fix(spawn-local-jdk): recognize and launch Windows JDK homes#51
deer merged 1 commit into
mainfrom
better_windows_support

Conversation

@deer

@deer deer commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

JDKDetector.of rejected any JDK home that lacked a bin/java file, which meant a staged Windows JDK -- one that ships only bin/java.exe -- was silently rejected before its release file was ever read, so the foreign-platform OperatingSystem/Architecture tagging added in #50 was unreachable for the one case it was built for.

This updates the bin/java existence check to also accept bin/java.exe, and updates LocalJDKLauncher#getExecutable to build the launch command with bin/java.exe on Windows and bin/java elsewhere, based on OperatingSystem.current(), so a detected Windows JDK can actually be launched rather than just recognized.

It also adds windows@... glob rules to java.home.properties for common Windows JDK install locations (Oracle, Zulu, Eclipse Adoptium, Microsoft Build of OpenJDK, Amazon Corretto, SDKMAN, Scoop, and GitHub Actions Windows runners). JDKHomeBasedPatternDetector#matchesOS already supported the windows OS-pattern prefix, but the properties file had zero entries using it, so paths() returned nothing on a native Windows host.

@deer deer merged commit 05f19e3 into main Jul 15, 2026
1 check passed
@deer deer deleted the better_windows_support branch July 15, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant