Use Multiple Java Versions on Fedora Linux

--

Hello again, in this article I will show you how to install and use multiple Java versions on Fedora for different projects. Open the terminal and write:

dnf search openjdk

The output should be like this. These are available Java packages under DNF repositories. You can install what you want by command:

sudo dnf install [package-name]

In my case, I want to use java 8 and 11 development environments.

sudo dnf install java-1.8.0-openjdk-devel.x86_64sudo dnf install java-1.8.0-openjdk-devel.x86_64

To learn which java version is in use

java -version
current java version

You can switch to another java version with the command:

sudo alternatives --config java

It will list of installed java versions and you can swtich between them by writing selection number and hitting enter.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Mert Çalışkanyürek
Mert Çalışkanyürek

No responses yet

Write a response