Skip to content

[Feature] Pin Java major version rather than specific release #308

@abjugard

Description

@abjugard

As detailed in sdkman/sdkman-cli#1154 it would be great if one of the focus areas for the re-write were to add support for pinning a JDK vendor and major version rather than a specific release.

Maybe something like:

# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17-tem

Which would resolve to whatever installed version exists of java with prefix 17 and vendor Temurin (tem), e.g. for me the current latest 17.0.14-tem which is what I have installed, and for a colleague it might be 17.0.12-tem.

Or if it's easier to support this using different keys, maybe:

# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
jdk=17
jdk-vendor=tem

These are just my suggestions, I don't really care exactly how it's configured, just that it would simplify management a lot if it were possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions