Skip to content

SDKMAN

Estimated time to read: 1 minute

Windows

Install WSL (Windows Subsystem for Linux)

To install Windows Subsystem for Linux on a Windows Machine; * Open Powershell as an administrator * Enter wsl --install and press return * Let the Powershell install WSL * When prompted, reboot your computer

Install sdkman in Ubuntu Shell

Once your computer has rebooted; * Open the start menu on your computer * Search for an application named 'Ubuntu' * Open 'Ubuntu

This will open WSL (Ubuntu), within this, run the following: apt install unzip && zip curl -s --insecure "https://get.sdkman.io" | bash

Follow the on screen instructions to install 'sdkman'.

Once installed, enter the following: source "$HOME/.sdkman/bin/sdkman-init.sh"

Close then re-open 'Ubuntu'

Enter sdk version in the shell. If this has been successful, you should see something like sdkman 5.1

Installing a Java SDK

Once you have confirmed that sdkman has been installed correctly. You can install a Java Development Kit.

To do so, from the Ubuntu Shell, enter: sdk install java x.y.z-open replacing x.y.z with the Java version that you require. It follows the major, minor, fix numbering model.

For example, sdk install java 18.0.0-open will install Java 18.0.0 (OpenJDK)