Published in


SDKMAN: The Software Development Kit Manager

One of the easiest ways to install multiple versions of Java JDK on your Mac

Photo by NeONBRAND on Unsplash

There are multiple ways to install Java JDK on your Mac:

However, I find that the SDKMAN is the easiest to install Java JDK and to switch between versions of Java JDK easily on my Mac. In the article, I will be introducing to you what is SDKMAN and how to install it on your Mac.

What’s is SDKMAN?

SDKMAN is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates. Formerly known as GVM the Groovy enVironment Manager, it was inspired by the very useful RVM and rbenv tools, used at large by the Ruby community.

Step 1: Install SDKMAN on Mac?

  1. Open a terminal and enter the following
    curl -s “" | bash
  2. Follow the instructions on-screen to complete the installation
  3. Open a new terminal or enter
    source "$HOME/.sdkman/bin/"
  4. Run the following to ensure that the installation succeeded
    sdk version
  5. If you have installed it successfully, you will see something like
    SDKMAN 5.13.2

Step 2: Install a specific Java JDK version

Now that we have installed SDKMAN from step 1, we can now choose a Java JDK version to install.

Example of a list of Java JDK versions
  1. Open a terminal, paste the following to find what are the list of Java JDK versions available to install
    sdk list java
    Note: Press q to exit
  2. To install a Java JDK version (e.g. 8.322.06.2-amzn from the image above), enter the following
    sdk install java 8.322.06.2-amzn
  3. If you have installed multiple Java JDK versions, you may switch to a specific version (e.g. 8.322.06.2-amzn) for the current terminal using the following command
    sdk use java 8.322.06.2-amzn
  4. If you want to make it the default version, enter the following
    sdk default java 8.322.06.2-amzn

And there we have it. I hope you have found this useful. Thank you for reading. If you enjoyed this article, remember to follow me for more updates!

Stay tuned for more articles ✌️.

If you are not a Medium member yet and want to become one, click here.




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Wei Kang

Wei Kang

Once a programmer, always a programmer