DEV Community

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

Posted on

7 2

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)

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay