10

Installation and switching between multiple versions of Java

 3 years ago
source link: https://blog.knoldus.com/installation-and-switching-between-multiple-versions-of-java/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Installation and switching between multiple versions of Java

Reading Time: 2 minutes

Having trouble in keeping multiple versions of Java in your single system? You have approached at the right place for seeking the solution.

In this blog, we will learn how to keep multiple versions of java in your system and how to switch between them as per your convenience.

Before moving forward, let’s have a basic understanding of what is SDKMAN?

What is SDKMAN?

As the official document says, “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.”

This is what we need in order to tackle this issue. For installing SDKMAN, you can refer to this link. Once you are done installing it, you can continue with this blog.

Steps for installing and switching between multpiles versions of java :

1.The command below will list down all the versions of java which are available. :

sdk list java

The symbol * in the below screenshot signifies all the versions of java which are installed on your system. Further, the symbol > signifies the current java version in use. The screenshot specifies that the system contains two versions : 11.0.2-open and 8.0.201-oracle and currently 11.0.2-open version is in use.

2. Install latest stable version of java using :

sdk install java

You can specify the version of java you want to install, for example, if your version is 9.0.1-zulu,

sdk install java 9.0.1-zulu

3. After installation, your system might contain multiple versions. You can switch between them using the command given below. For example if your required version is 8.0.201-oracle,

sdk use java 8.0.201-oracle

You can verify by using the command mentioned in step (1).

Now, you can continue working with your required version.

Happy Blogging!

  • blog_footer.png?resize=600%2C431&ssl=1

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK