+1 (506) 500-5957 sales@monovm.com Get US VPS for 50% OFF!

How to Install OpenJDK on CentOS

How to Install OpenJDK on CentOS, OpenJDK is a free, open-source implementation of the Java platform. In this article we will show you how to install it on CentOS systems.

Posted: 14 Apr, 19 Updated: 05 Mar, 23 by Elizabet J 3 Min

List of content you will read in this article:

There are many programming languages out there, however, even people that are not part of the software development world recognize the word Java. In order to write any software in Java, you will need a way to compile it, and that’s where OpenJDK comes into play. Although there are quite a few platforms to choose from, what’s better than free and open source?

Today we will explain a little more about OpenJDK, its versions, and how to install it on CentOS operating system.

 

OpenJDK is a Java implementation and compilation platform that is free and open source. After installing this platform, you will be able to run or develop software written in the Java programming language. It has two different versions that we must first examine before installing:

  • OpenJDK JRE: The platform acts like a virtual machine on your CentOS VPS, also called JVM, and provides the ability to run Java applications for the CentOS operating system.
  • OpenJDK JDK: This version of OpenJDK is designed for developers and dual-core developers to provide them with the ability to install Java applications as well as install JRE on the platform during installation.

In this tutorial we will show how to install both the aforementioned versions. If you wish to install only one of them, follow the steps specified for that version.

 

Please Note: The commands described in this tutorial work on Centos 7, 6, 5, and Fedora. To install the OpenJDK platform, you must have root access to your operating system. If you use another root user with an access token, enter the sudo command before executing the commands.

How to Install OpenJDK JRE

To install the JRE version of the OpenJDK platform, enter the following command:
yum install -y java-1.7.0-openjdk
Keep in mind that the version installed with the above command is version 7 of this platform. If you want to install version 6, you must enter the following command:
yum install -y java-1.6.0-openjdk

How to Install OpenJDK JDK


To install the JDK version, enter the following command:
yum install -y java-1.7.0-openjdk-devel
This way, you will be able to install JDK version 7 for dual-core. If you intend to install version 6, enter the following command instead:
yum install -y java-1.6.0-openjdk-devel

 

We hope that with the help of this article you were able to expand your knowledge about the OpenJDK Java implementation platform. If you run into any problems throughout the installation process or have any questions/suggestions, please leave them in the comment section below.

Elizabet J

Elizabet J

One OF my major goals is getting new experiences about ICT and what’s more making progress through this field.