GoogleChromeLabs / GoogleChromeLabs/bubblewrap

Find JDK automatically in common places

Open
#792 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
TypeScript
Stars
3.1k
Forks
319
PR merge metrics
No merged PRs in 30d

Description

```
$ which javac
/home/christian.hujer/.sdkman/candidates/java/current/bin/javac
$ javac --version
javac 19.0.2
$ bubblewrap init --manifest https://chatncharge.nelkinda.com/manifest.json
,-----. ,--. ,--. ,--.
| |) /_,--.,--| |-.| |-.| |,---.,--. ,--,--.--.,--,--.,---.
| .-. | || | .-. | .-. | | .-. | |.'.| | .--' ,-. | .-. |
| '--' ' '' | `-' | `-' | \ --| .'. | | \ '-' | '-' '
`------' `----' `---' `---'`--'`----'--' '--`--' `--`--| |-'
`--'
? Do you want Bubblewrap to install JDK?
(Enter "No" to use your JDK installation) No
? Path to your existing JDK:
```
Bubblewrap should offer to pick up what's in `PATH`. Supporting SDKMAN! would be best, but at least pickup what's on PATH.

**Is your feature request related to a problem? Please describe.**
It's frustrating that a tool like bubblewrap can't pickup where my JDK is, especially when my JDKs are in standard locations like `~/.sdkman/candidates/java/` and `/usr/lib/jvm/`.

**Describe the solution you'd like**
I would like Bubblewrap to try to pick up Java by itself, in this sequence:
1. Try to find `java` from `$PATH`.
2. Try to find a suitable version from _SDKMAN!_ using `$SDKMAN_CANDIDATES_DIR` if defined, otherwise `$SDKMAN_DIR/candidates`.
3. Try to find a suitable version from `/usr/lib/jvm`.
If a version is found, ask the user if that version should be used. If yes, use it, if no, keep on looking.
If no version found, give up and ask the user.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.