Java is a powerful programming language that can be used to develop a wide range of applications. If you're a developer or a student who needs to use Java, you'll need to install it on your Mac.
In this article, we'll see how to install Java on macOS using SDKMAN, a popular tool for managing Java versions, and other alternatives to try out.
Nope, not gonna say that. I will explain what worked for me.
I have tried HomeBrew, asdf, and sdkman. Here is my analysis of those tools.
HomeBrew - Steep learning curve (formulae, cask, Tapping, unTapping).
Worth spending time on if you are accepting home brew as your mac package manager and gonna use it for a long time, not for those who need only java installation.
Asdf - easy to use, but community and contributors for the java plugin are less active compared to others.
SDKMan - Easy to use and active community. I preferred this. it is pretty straightforward.
- Open the terminal and run
curl -s "https://get.sdkman.io" | bash
- Then run
- Then run
sdk install java 20-temto get the latest temurin version or just run
sdk install javato get the latest stable version of temurin.
- you can try
sdk list javafor choosing different vendors and install accordingly.
- packages installed using SDK will be in
It helped me to kick start my development on Mac as newbie to mac and hope it helps you too.