I am using sdkman on my machine to manage Java. when I run sdk list java
I see all the patch point releases. For example I see Corretto version 21 with id 21-amzn
and Corretto version 21.0.1 with id 21.0.1-amzn
I would like to be able to say something like "sdkman please use the latest Java 21 from Amazon Corretto" with the expectation that sdkman can keep updating to the latest patch release.
When I run sdk upgrade java
it prints out java is up-to-date
but when I run sdk list java
I see the output below clearly there is a newer patch release of corretto 21.0.1 but upgrade seems to treat 21 and 21.0.1 as totally different versions.
Question: Is there some way to configure sdkman commands to always use the latest stable release of a major version of java from a specific distro?
================================================================================
Available Java Versions for macOS ARM 64bit
================================================================================
Vendor | Use | Version | Dist | Status | Identifier
--------------------------------------------------------------------------------
Corretto | | 21 | amzn | installed | 21-amzn
| | 21.0.1 | amzn | | 21.0.1-amzn
| | 20.0.2 | amzn | | 20.0.2-amzn
| | 20.0.1 | amzn | | 20.0.1-amzn
| | 17.0.9 | amzn | | 17.0.9-amzn
| | 17.0.8 | amzn | | 17.0.8-amzn
| | 17.0.7 | amzn | | 17.0.7-amzn
| | 11.0.21 | amzn | | 11.0.21-amzn
| | 11.0.20 | amzn | | 11.0.20-amzn
| | 11.0.19 | amzn | | 11.0.19-amzn
| | 8.0.392 | amzn | | 8.0.392-amzn
| | 8.0.382 | amzn | | 8.0.382-amzn
| | 8.0.372 | amzn | | 8.0.372-amzn
Preface:
Just from their official docs: https://sdkman.io/usage#upgrade
Installing the latest stable version of XXX:
Install the latest stable version of your SDK of choice (say, Java JDK) by running the following command:
$ sdk install java
Workaround:
Create a bash script which