SDKMAN! - ivmg5/dotfiles GitHub Wiki

Official Repository

https://sdkman.io/

Requirements

SDKMAN! is installed with:

curl -s https://get.sdkman.io | bash

That’s all you need to get started.

Why I Use It

Managing Java, Scala, Kotlin, and other SDKs manually is a hassle: downloading, unpacking, updating, and switching versions can quickly get messy. SDKMAN! makes it painless—it handles installation, upgrades, and switching between SDK versions with simple commands. It also supports per-project versions via .sdkmanrc, so each project can define exactly which SDK it needs. This keeps environments consistent and avoids version conflicts.

Setup

I recommend copying the .zshrc from my dotfiles first.

The only file in my dotfiles related to SDKMAN! is:

~/.sdkman/etc/config

That file controls SDKMAN!’s behavior—things like enabling auto-completion, colorized output, automatic environment switching, and update settings. With it in place, SDKMAN! works smoothly and with minimal manual configuration.

Usage

Install an SDK

First check what’s available:

sdk list              # Shows all available SDK candidates
sdk list <sdk>        # Lists versions for a specific SDK

Then install:

sdk install <sdk>              # Latest stable version (ex: sdk install java)
sdk install <sdk> <version>    # Specific version (ex: sdk install scala 3.4.2)

Uninstall an SDK

sdk uninstall <sdk> <version>

Apply a version

sdk use <sdk> <version>       # Current terminal only
sdk default <sdk> <version>   # Set as default for all terminals

Check what’s active:

sdk current          # Shows all SDKs in use
sdk current <sdk>    # Shows version for a specific SDK

Update to new versions

sdk update           # Refresh cache and check for new SDKs
sdk upgrade          # Update all outdated SDKs
sdk upgrade <sdk>    # Update a specific SDK

Per-project versions (.sdkmanrc)

sdk env init      # Creates a .sdkmanrc with current version
sdk env install   # Installs missing SDKs defined in .sdkmanrc
sdk env clear     # Restore defaults after leaving project

With .sdkmanrc in place, the correct SDK version activates automatically when you enter the project directory.

⚠️ **GitHub.com Fallback** ⚠️