SDKMAN: The Software Development Kit Manager
One of the easiest ways to install multiple versions of Java JDK on your Mac
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.
Home - SDKMAN! the Software Development Kit Manager
Making life easier. No more trawling download pages, extracting archives, messing with _HOME and PATH environment…
Step 1: Install SDKMAN on Mac?
- Open a terminal and enter the following
curl -s “https://get.sdkman.io" | bash
- Follow the instructions on-screen to complete the installation
- Open a new terminal or enter
- Run the following to ensure that the installation succeeded
- If you have installed it successfully, you will see something like
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.
- 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
- 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
- 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
- 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.
Join Medium with my referral link — Wei Kang
As a Medium member, a portion of your membership fee goes to writers you read, and you get full access to every story…