Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support local-first version expressions #6

Open
marktsuchida opened this issue Jun 23, 2022 · 3 comments
Open

Support local-first version expressions #6

marktsuchida opened this issue Jun 23, 2022 · 3 comments

Comments

@marktsuchida
Copy link
Collaborator

Versions suffixed with ~ should alter the matching rules, such that the closest matching version among the already installed JDKs is selected.

17~ should find the newest installed 17.x, failing if no 17.x is installed
17+~ should find the newest installed, failing if the newest installed is less than 17

This can minimize downloads when used for tasks where having the latest JDK is not critical.

@marktsuchida
Copy link
Collaborator Author

Could optionally also pick up locally installed JDKs (e.g., system-installed, outside of cjdk), where known (or somehow configured), at least when the vendor is left unspecified.

@marktsuchida
Copy link
Collaborator Author

Without --no-remote (#5), perhaps it should download, rather than fail, when not found locally.

@ctrueden
Copy link
Contributor

Could optionally also pick up locally installed JDKs

I just added some logic like this to my dotfiles (1). In a nutshell, you can parse the output of update-java-alternatives -l for (some flavors of) Linux, or /usr/libexec/java_home -V for macOS. I need to add cjdk support to my dotfiles... 😅

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

No branches or pull requests

2 participants