Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Java on Arch Linux

According to https://wiki.archlinux.org/index.php/Java I can install Open JDK 7 on a clean Arch Linux installation by invoking the command

pacman -S jdk7-openjdk

But when doing so, I get an error saying

error: target not found: jdk7-openjdk

I already commented out my nearest Pacman repository in /etc/pacman.d/mirrorlist and ran a first update by invoking pacman -Syu hoping that this would cause the package above to be discovered.

How can I install Open JDK 7 on Arch Linux using pacman?

Edit: I'm running a Raspberry Pi with an ARM processor and I'm hoping to get a Java build that is tailored for its hardware and uses the OS hardware floating point support.

like image 943
Jeroen Kransen Avatar asked Nov 18 '12 11:11

Jeroen Kransen


Video Answer


2 Answers

Get the best mirror near you (check this list); you can even generate a new mirror list on the archlinux website. Then run # pacman -Syy; # pacman -Su; # pacman -S jdk8-openjdk (or jre8-openjdk if you only need the JRE)

like image 199
Andrea Scarpino Avatar answered Sep 27 '22 18:09

Andrea Scarpino


Try the following command:

pacman -S jre7-openjdk
like image 31
Qinsi Avatar answered Sep 27 '22 18:09

Qinsi