Skip to content

Feature: sdk default <candidate> should set to latest LTS when version omitted #433

@chloe41427

Description

@chloe41427

Feature request

Currently, sdk default <candidate> requires an explicit version argument:

sdk default java 21.0.1

This feature request adds the ability to call sdk default <candidate> without a version, which should automatically set the default to the latest LTS version of that candidate:

sdk default java
# Should set java to the latest LTS (e.g., 21 or 25)

Why this would be useful

  • Convenience: Users don't need to look up the latest LTS version manually
  • Consistency with bash SDK: Aligns with expected SDKMAN! behavior
  • Workflow improvement: Simplifies automated setup scripts that want to default to LTS

Related

Discussion in #354 about sdk default, sdk use, and sdk current semantics clarified this gap.

  • sdk default <candidate> <version> — sets the global default to a specific version
  • sdk use <candidate> <version> — sets version for this shell session only
  • sdk current <candidate> — reports currently active version in this shell

This feature extends sdk default to infer the latest LTS when no version is provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions