#Cant install java on ubuntu server

85 messages · Page 1 of 1 (latest)

kind remnant
#

hello im trying to install java runtime for java 16 on my ubuntu server because i want to run a minecraft server it gives me an error that it does not exist i tried adding repositories not working tried manually not working please help me asap

elfin pebbleBOT
#

This post has been reserved for your question.

Hey @kind remnant! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

steep stirrup
#
sudo apt-get update
sudo apt-get install libc6-i386```
#

copy those one by one and paste

kind remnant
#

done

steep stirrup
#

check

#

reinstall java after just to double check

kind remnant
#

E: Unable to locate package openjdk-16-jre

#

i dont even have installed java....

steep stirrup
#

sudo apt remove openjdk-16-jre

#

lol then

#

sudo apt install openjdk-16-jre

kind remnant
steep stirrup
#

let me check

kind remnant
#

or should i try reinstalling the whole os?

steep stirrup
#

no lol

kind remnant
#

okayyyyyyy

steep stirrup
#

sudo apt install default-jre

#

try this

#

check version after it

kind remnant
#

it gives me this error when starting the server
Unsupported Java detected (55.0). This version of Minecraft requires at least Java 16. Check your Java version with the command 'java -version'.

steep stirrup
#

what version is it

kind remnant
#

openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment (build 11.0.17+8-post-Ubuntu-1ubuntu222.04)
OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Ubuntu-1ubuntu222.04, mixed mode, sharing)

#

I need java 16 when tried 17 it told me the same error when starting the minecraft server

steep stirrup
#

it works for me

kind remnant
#

and i can install any othe version then 16

steep stirrup
#

i use kubuntu

kind remnant
#

ITS WORKNG

#

OMG

#

how do i

#

uninstall the older version (11)

steep stirrup
#

i gave a command earlier

#

sudo apt remove openjdk-11-jre

#

i think

#

yeah

#

it works

kind remnant
#

okay im gonna try to start the server give me a second

#

it gives me this Unsupported Java detected (61.0). Only up to Java 16 is supported. and when i type java -version it says 17 😢

steep stirrup
#

sudo apt update

kind remnant
#

still got the error

steep stirrup
#

did you remove the other java versions

kind remnant
#

yes

#

i can try again

steep stirrup
#

do java -version

#

and send the stuff in it

kind remnant
#

java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)

steep stirrup
#

maybe remove 17

#

and install 16

#

it gives me this Unsupported Java detected (61.0). Only up to Java 16 is supported.

#

since its only till 16

kind remnant
#

i did that i removed java 17 apt remove java-common (i did this because sudo apt remove java-open-17 or that thing you told me to remove java 11 did not work) and installed it with the 16 command but it installed 17

steep stirrup
#

hmmm

#

did you follow the docs before

kind remnant
#

YES

#

im gonna try to reinstall the whole OS

steep stirrup
#

no need

golden palm
#

dont

#

it wont affect anything

steep stirrup
#

just follow docs

kind remnant
#

i did (insert crying emoji)

steep stirrup
#

i will send you proper instructions in a minute

golden palm
#

is he trying to install java 16?

steep stirrup
#

yeah

#

here

#

you might need to change directory though

#

go down and go to jdk 16

#

16 GA (build 16+36)

#

this one

#

then go to the place you downloaded it

#

explorer

#

then right click open terminal there

#

then do

#

tar zxvf openjdk-16_linux-x64_bin.tar.gz

#

now you will get a jdk-16

#

folder

#

done

#

just change directory of java

kind remnant
#

im just gonna reinstall the server with another os just mark this form as unsolved and leave it open

steep stirrup
#

you will get into other problems but as you wish

steep stirrup