How to install java 8

July 16, 2024, 11:50

moos13

I am trying to set up a minecraft server and need java 8 for that. All I can find on the internet suggests running "sudo apt install openjdk-java8-jdk" but i always get this error: "E: Unable to locate package openjdk-java8-jdk". I tried multiple package managers but all with the same result. The oldest version I could find was java17 but that won't work for me Dont know if this is important but I am using a Raspberry Pi 5 8GB with 64-bit Raspberry Pi OS

thunder07337

If a package is no longer contained in the repository, it must be installed manually. https://itslinuxfoss.com/install-openjdk-8-debian-12/

moos13

ill try that, thank you

moos13

well, im not gonna create an account at Oracle just to download openjdk. Seems not worth it

jannik44

be careful, old java and especially old minecraft versions are full of bugs and security issues

e_xie

Jdk 8 worked great for me and my 4 friends Minecraft server

jannik44

you need the jre anyways not the jdk,

jannik44

you can just use jre 21

moos13

no, older minecraft versions wont work with aynthing newer than jre 8

riothedev

which version are u using

moos13

1.16.5 Forge, the vanilla version seems to run fine on newer java versions

riothedev

Java 16 should work

moos13

I cant get java 16 tho

riothedev

why not

justaccsolol

try with sudo apt-get install openjdk-8-jdk

justaccsolol

or for java 11, sudo apt install openjdk-11-jre-headless