I cannot figure out anywhere online how to download java 8 just to host a minecraft server and since there is no more sudo apt install javajdk-8-jdk i cant figure it out
Asked
Active
Viewed 187 times
-1
-
1The package name is `openjdk-8-jre` (you don't need the JDK unless you're compiling something - just use the JRE). That should work for older versions of Minecraft, like 1.8. However, newer versions of Minecraft (1.16+) require Java 16 (`openjdk-16-jre`), and Minecraft 1.18 uses Java 17 (`openjdk-17-jre`). – cocomac Apr 03 '22 at 06:47
-
https://prnt.sc/3LcPxjj6Df6e – Doge4life Apr 03 '22 at 06:55
-
also i am running a 1.12.2 server so i would prefer – Doge4life Apr 03 '22 at 06:55
-
Please provide OS, product & release details.. I see `openjdk-8-jre` available for Ubuntu Server products; for most it's in `universe` but you've not provided any product/release details. Are you using a Ubuntu Core Server? a standard Ubuntu Server install? and what release of your *unstated* product? (*and if you're using a release that required 'universe', have you enabled it? we don't know what you're running so cannot know if that applies to you as we're limited to details you provide*) – guiverc Apr 03 '22 at 07:06
-
OS is a standard install of ubuntu server 20.04 – Doge4life Apr 03 '22 at 07:25
-
The device im using is an dell poweredge 2850 – Doge4life Apr 03 '22 at 07:25
-
Release details or additional details should be in your question; do you have `universe` enabled? The package is there - `openjdk-8-jre | 8u312-b07-0ubuntu1~20.04 | focal-updates/universe | amd64, arm64, armhf, i386, ppc64el, s390x` for most architectures too ! – guiverc Apr 03 '22 at 07:26
-
I am new to linux and i am not sure how to enable universe – Doge4life Apr 03 '22 at 07:26
1 Answers
0
As you're on Ubuntu Server, first enable the universe repository to get Java.
Run this command on your Ubuntu server:
sudo add-apt-repository universe
Then refresh your repositories so you can install Java:
sudo apt update
Finally, install Java 8, as you want to run a Minecraft 1.12 server:
sudo apt install openjdk-8-jre
If you want to run a Minecraft 1.16/1.17 server, install openjdk-16-jre instead.
For Minecraft 1.18, install openjdk-17-jre.
Have a nice day!
AaronTechnic
- 31
- 4