Java Installation made easy

With java releasing a new version every six months it has been quite tricky to get your hands dirty and try out new feature. As every time you will need to search for various versions, download them, extract them and then fight an ever confusing battle with bash profile to point JAVA_HOME to the desired version.

Add to the misery, once you are done experimenting you will again go back and forth to rollback it to the verison with which your applications have been running until now. Well if you also have faced these annoying issues this article is for you.

SDKMAN to the rescue!!

What is that??

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems” — sdkman


curl -s "" | bashsource "$HOME/.sdkman/bin/"sdk version

This should provide you the version of SDKMAN installed. Once the installation is done you’re ready to install your desired java version.

Install Java

Now that we have the sdkman set up, we are ready to install the latest java version.

To find out versions available run

sdk list java

Now install the desired version(say Amazon’s corretto) using

sdk install java

Temporarily switch to a different version using (note this is only for this particular shell session)

sdk use java <java-version>

Permanently switch to a different java version

To uninstall a particular java version use

sdk uninstall java




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

DB certifies professionals in Parasoft Solutions

Lao-Top foundation2

…and that’s a wrap!

New Public Agents at Sherweb

Obkio New Public Agents at Sherweb

Let’s GO! Part 12: Reference Types 4: Channels

Python File Handling

ADF Managed Identity connection to ASQL leveraging AKV

Making sense of nested loops

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
Shubham Sharma

Shubham Sharma

More from Medium

How to run multiple Java versions (like Java 8, 11 or latest) on Mac machine

Why String is Immutable in Java?

Let’s Get Some Small Overview of Collection Framework in Java

Java — A Quick Tour