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
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
To set up the most recent model of JRE, run the command.
$ sudo pacman -S jre-openjdk
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
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
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
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.