

Installation and switching between multiple versions of Java
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.

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!
Recommend
-
45
Tool for switching between different versions of commands
-
36
Sometimes it seems like there are new versions of Node.js released almost weekly — minor versions every few weeks, major versions every few months. If you are a developer that needs to switch between different application...
-
11
Xcodes.app The easiest way to install and switch between multiple versions of Xcode. If you're looking for a command-line version of Xcodes.app, try xcodes...
-
10
Mac os upgrade and use Multi-java version solution : Switching between JDK 8 and 11 using SDKMAN! This article is transferred from
-
6
Switching between multiple Office accounts coming to Office Mobile for Android...
-
5
Managing and switching node versions with nvm If you’re working on multiple projects with different node versions, switching versions can get tricky.
-
3
Switching between AHCI and RAID on the Dell XPS 15 (9560) This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) wit...
-
6
PKCS 11 Provider across multiple Java versions – Adam Gamboa G – Developer Skip to content
-
8
Compatibility between Yocto and Qt 6 Versions We can build the Qt versions from 6.2 to 6.5 with the meta-qt6 layer for the Yocto versions 3.1...
-
4
Multiple PHP versions using phpenv and php-build Install dependecies Debian/Ubuntu users sudo apt install \ autoconf \ bison \ build-essential \ libbz2-dev \ libc-client-dev \...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK