sdkman: the Software Development Kit Manager

Categories: Programming, Linux

This is a quick note about a very cool tool for installing development tools for Java/Groovy/Kotlin/Scala, and more, on linux/unix systems. For those familiar with the nodejs management tool nvm, sdkman provides similar features for other languages.

To install sdkman (“the Software Development Kit Manager”):

curl -s | bash

It doesn’t install like a regular program. In my environment, it created directory ~/.sdkman then modified ~/.bashrc to load a script from that directory on startup. The scripts define a shell-function named sdk() which is why executing sdk from the shell works, but which sdk reports nothing.

Then do things like:

sdk update
sdk list
sdk install java some-version-id
sdk install java some-other-version-id
sdk install kotlin
sdk install maven

sdk use ...   # use the specified dev environment install from the current shell
sdk default .. # use the specified dev environment install from all shells

sdkman can also be configured to switch environments based upon the current directory (ie upon the presence of a file .sdkmanrc). See the offical (and very good) docs.