Home / Linux / How to Install Java on Arch Linux

How to Install Java on Arch Linux

How to Install Java on Arch Linux

Java is undoubtedly one of the well-liked programming languages ever to grace the face of the planet, powering thousands and thousands of purposes each on Linux and Windows platforms.

Java contains of JRE (Java Runtime Environment) and JDK (Java Development Toolkit). JRE is a set of software program purposes that assist in the deployment of Java purposes. JDK is a growth atmosphere essential for the constructing and compilation of Java purposes.

Recommended Read: 6 Best Arch Linux Based User Friendly Distributions of 2019

In this tutorial, we’re going to take you thru a step-by-step of how one can set up Java on Arch Linux.

Step 1: Check If Java is Installed

To start with, let’s examine if Java is put in within the Arch Linux utilizing the next command.

$ java -version
OR
$ which java 
Check Java Installation on Arch LinuxCheck Java Installation on Arch Linux

Check Java Installation on Arch Linux

From the output above, it evident that Java is lacking. Let’s now proceed and set up each JRE and JDK which each represent JAVA.

Step 2: Install JRE in Arch Linux

To set up JRE (Java Runtime Environment), a primary search which variations can be found for obtain utilizing the command.

$ sudo pacman -sS java | grep jre
Search Java Version in Arch LinuxSearch Java Version in Arch Linux

Search Java Version in Arch Linux

To set up the most recent model of JRE, run the command.

$ sudo pacman -S jre-openjdk
Install Java JRE in Arch LinuxInstall Java JRE in Arch Linux

Install Java JRE in Arch Linux

Press Y and hit ENTER to proceed with the set up of JRE and different dependencies.

Step three: Install JDK in Arch Linux

With JRE put in, we are able to proceed to set up JDK on our Arch Linux system. Once once more, let’s seek for the variations of JDK which can be accessible for obtain.

$ sudo pacman -sS java | grep jdk
Search Java JDK Version in Arch LinuxSearch Java JDK Version in Arch Linux

Search Java JDK Version in Arch Linux

The first choice is normally the most recent model, so to set up the most recent JDK, run the command.

$ sudo pacman -S jdk-openjdk
Install JDK in Arch LinuxInstall JDK in Arch Linux

Install JDK in Arch Linux

As proven earlier than, press Y when prompted and hit ENTER to proceed with the set up course of. This will take a bit extra of your time, so some persistence will do.

At this level, we’ve efficiently put in JAVA on our Arch Linux system.

To confirm that JAVA has certainly been put in, run.

$ java -version
$ which java
Verify Java Version in Arch LinuxVerify Java Version in Arch Linux

Verify Java Version in Arch Linux

Check Java Command LocationCheck Java Command Location

Check Java Command Location

Conclusion

In this text, we demonstrated how one can set up Java on Arch Linux. You can now proceed and set up purposes reminiscent of Apache Tomcat, Maven, Jenkins, and Gradle.

About Agent

Check Also

SpaceX Successfully Launches 60 More Starlink Satellites as it Continues Towards 2020 Service Debut

SpaceX Successfully Launches 60 More Starlink Satellites as it Continues Towards 2020 Service Debut SpaceX …

Leave a Reply

Your email address will not be published. Required fields are marked *