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:
- A Linux subsystem (WSL)
- A Unix like shell emulator (Git Bash or Cygwin)
- 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
- Full Linux compatibility
- Works with all SDKMAN packages
- Good performance for daily development
Cons
- Initial setup and disk space required
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
- No WSL required
- Simple if you already use Git Bash
Cons
- Limited compatibility in edge cases
- Some SDK installs may fail or need manual path fixes
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
- Fully native on Windows
- Fast and simple installs
- No Linux dependencies
Cons
- Not the real SDKMAN tool
- No
sdk useorsdk defaultcommands
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
- Professional JVM developers: use WSL with SDKMAN for the most reliable experience.
- Casual users or Git Bash fans: possible, but expect occasional limitations.
- Windows first developers who only need JDK management: choose Scoop for simplicity.
Recommendation: if you manage multiple SDKs and need reproducible builds, use WSL with SDKMAN. For lightweight JDK installs, Scoop is convenient.