DEV Community

Cover image for Install Java JDK on Arch Linux
Md. Maruf Sarker
Md. Maruf Sarker

Posted on

Install Java JDK on Arch Linux

open your terminal first

At first check is java jdk already installed on your system or not

java --version
Unknown command: java
which java
which: no java in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)

Install JRE in Arch Linux

sudo pacman -sS java | grep jre

Install the latest version of JRE

sudo pacman -S jre-openjdk

Install JDK in Arch Linux

sudo pacman -sS java | grep jdk

Install the latest version of the JDK

sudo pacman -S jdk-openjdk

Now check, is java installed or not on your system by running this command

java --version
openjdk 18.0.1.1 2022-04-22
OpenJDK Runtime Environment (build 18.0.1.1+2)
OpenJDK 64-Bit Server VM (build 18.0.1.1+2, mixed mode)

Discussion (0)