Install Java on Fedora – [JDK 6,7,8 and Oracle 8&9 JDK]- Beginner Tutorial

Install Java on Fedora – [JDK 6,7,8 and Oracle 8&9 JDK]- Beginner Tutorial

Introduction

There are various versions of Java available for you to install.

Here in this article:

we will see how to install Open JDK Version 6,7 and 8 and also,

we will see How to install Oracle Java 9 and 8.

Java has three editions such as Java EE(Enterprise Edition), Java SE(Standard Edition) and Java ME(Micro Edition).

Here,  in this tutorial, we will see how to install Java Standard Edition Development Kit (JDK) and Java Runtime Environment (JRE).

Here, the Java Runtime Environment helps you to compile and run the programmers.

You will need Java Development Kit to develop java programmers.

The JDK includes the Java Runtime environment.

There are two types in Java installation. One is Installation of Open JDK and the other is Oracle Java.

The Major difference between both of them is Open Source. Here Open JDK is open source and Oracle Java contains some specific codes.

You do not need to worry much about the functions. Both of them are supporting all types of software.

Also, A user can install various versions of Java in his system and use the required one.

Mostly you dont need to install all the versions of Java and you only need one.

It is our recommendation to install a single standard version of Java.

Even, if you install multiple versions of Java, you can switch between them.

Let us see all the required instructions to install java on fedora in this article.

Open JDK 6 Installation

We will install Open JDK RE using the below command.

When you prompted, Enter Y and Press Enter button.

To Install Open JDK 6 JDK use the below command.

Press Y and Then hit enter.

Open JDK 7 Installation

To install Open JDK 7 RE, use this command.

Install Open JDK 7 JDK using the below command.

Open JDK 8 Installation

The commands are similar to each other. In the same way as above, install Open JDK 8 RE using the below command.

To install Open JDK 8 JDK, use this command.

sudo yum install java-1.8.0-openjdk-devel

Install Oracle Java 9 on Fedora

Here in this section, let us see how to install Oracle Java 9 RE and Oracel Java 8 JDK.

Here is the link to the page where you can find link for downloading oracle java file.

We will download the file from external source and install.

For that, we will require wget. To install wget, use the below command.

After that, switch to home directory.

Then, use download Oracle 9 JRE Package using the below command.

The Package will have .rpm extensions.

To install the downloaded package, here is the command.

You will be asked to enter Yes or No, Just type Y and Hit enter.

Then, run the below command to remove the downloaded package to free up the space.

To Install Oracel 9 JDK, here is the command.

Now, the package will be downloaded. You can use this command run the installation of downloaded file.

After the installation process, Just remove the downloaded archive using the below command.

Install Oracle Java 8 on Fedora

Here is the simple command to download the Oracle Java 8 RE Package.

To install the downloaded Oracle Java 8 RE package, use this command.

Then, remove the archive file, use this command.

To install Oracle Java 8 JDK, first download the appropriate .rpm package.

Here is the command for that.

Then, install the JDK using the below commad.

Install the Package using the below command.

Then, remove the archive file using this command.

Setup the default JDK version

Since, we have downloaded and install multiple versions of Java, we have to decide which we should use by default.

To find the existing version of Java, use the below command.

To see all the available Java versions, use this command.

You will get the following output with prompt asking to enter a number from the list to setup the java verisons.

There are 5 programs which provide ‘java’.

Enter to keep the current selection[+], or type selection number:

Enter any number from the list to continue.

Conclusion

Thats all. Now you have learned how to install various versions of Java and how to switch between them.

If you have any queries, leave them in command.

Also, make sure to subscribe to receive new tutorials on cloud, server management and Operating systems.

 

Comments are closed.