Why SDKMAN does not natively work on Windows

SDKMAN is written for POSIX shells. Windows CMD and PowerShell do not provide full POSIX behavior. To use SDKMAN effectively you need one of the following:

  1. A Linux subsystem (WSL)
  2. A Unix like shell emulator (Git Bash or Cygwin)
  3. A Windows native package manager as an alternative (Scoop)

Option 1: WSL — Windows Subsystem for Linux

The most compatible and reliable method is to run SDKMAN inside WSL with Ubuntu.

Step 1: Enable WSL and install Ubuntu

wsl --install -d Ubuntu

Step 2: Install dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install curl unzip zip -y

Step 3: Install SDKMAN

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version

Pros

Cons


Option 2: Git Bash or Cygwin

This keeps you in a Windows desktop environment but provides a Bash shell. Some SDKMAN features may not work perfectly.

Install

Add unzip and curl if missing

choco install unzip

Install SDKMAN in Bash

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

Pros

Cons


Option 3: Scoop — Windows native alternative

If you only need JDK management on Windows, Scoop is a clean native solution without Bash.

Install Scoop

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex

Add the Java bucket and install a JDK (Temurin 17)

scoop bucket add java
scoop install temurin17-jdk
java -version

Pros

Cons


Common errors and fixes

1. Please install unzip on your system
Cause: the unzip utility is missing.
Fix: sudo apt install unzip -y on Ubuntu, or choco install unzip on Windows.

2. Couldn't find manifest for 'temurin17'
Cause: the Scoop Java bucket is not added or outdated.
Fix: scoop bucket add java, then retry.

3. sdk command not found
Cause: the SDKMAN init script was not sourced.
Fix: source "$HOME/.sdkman/bin/sdkman-init.sh" or restart the shell.

4. Permission denied
Cause: missing execute permissions on SDKMAN files.
Fix: chmod +x ~/.sdkman/bin/*.


Which method should you choose

Recommendation: if you manage multiple SDKs and need reproducible builds, use WSL with SDKMAN. For lightweight JDK installs, Scoop is convenient.

Series navigation