forked from shyiko/jabba
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Currently, javm only works with versions it explicitly installs or linked with javm link. Adding support for JDK discovery would allow users to use existing JDKs on their system (e.g. from SDKMAN, Jabba, or manually installed ones), improving compatibility, reducing duplication, and easing migration.
The discovery system should search for candidate JDKs from multiple sources and collect their metadata (version, vendor, architecture, etc). Some locations that can be used by this discovery mechanism:
- Common locations: /usr/lib/jvm (on Linux), /Library/Java/JavaVirtualMachines (on macOS), C:\Program Files\Java (on Windows), JAVA_HOME env var
- Other version managers: Detect and scan paths used by Jabba, SDKMAN!, and Asdf-vm
- IntelliJ JDKs
- Maven toolchains
- Gradle auto-provisioned toolchains
Idea of detection process
For each candidate path:
- Ensure it contains a working bin/java
- Run java -version or parse the release file
- Parse metadata: version, vendor, implementation type (JDK/JRE), architecture
Cache results to avoid repeated I/O or process spawns
Metadata
Metadata
Assignees
Labels
No labels