I’ve tried installing java on my laptop so I can code. Everytime I try to compile a .java file it says
bash javac: command not found
Following a guide online I tried putting in this command to install the JDK
sudo pacman -S jre-openjdk-headless jre-openjdk jdk-openjdk openjdk-doc openjdk-src
After loading and doing nothing for a couple minutes it shoots out many errors, all along the lines of
error: failed retrieving file 'openjdk8-src-8.362.u09-1-x86_64.pkg.tar.zst' from mirror.ibakerserver.pt : The requested URL returned error: 404
The result of java -version
is
openjdk version "19.0.2" 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7)
OpenJDK 64-Bit Server VM (build 19.0.2+7, mixed mode)
When I enter which javac
it spits out
which: no javac in (/home/matthew/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin)
And when I enter echo $PATH
is says
/home/matthew/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
If you need any other information, please let me know!