Java update issue

Issues related to applications and software problems
Post Reply
webnoob
Posts: 37
Joined: 2017/02/01 11:26:27

Java update issue

Post by webnoob » 2021/06/12 13:47:58

Hi smart heads
I am running a minecraft server for the kids on a Centos7. I recently updatet Minecraft to 1.17.
I googled a little and found out I needed to outdate my java. When first made the server I installed java-1.8.0-openjdk. I have tried to uninstalling it, I have tried installing java-1.11.0-jdk, but it dosen't help. When I run java -version I all ways get
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
How do I install a newer java so I can start my minecraft server?

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Java update issue

Post by TrevorH » 2021/06/12 14:41:33

What's the output from the following:

which java
ls -la $(which java)
rpm -qa \*java\) | sort

If the output from the ls -la is a pointer to a symlink then run ls -la against that one too.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

webnoob
Posts: 37
Joined: 2017/02/01 11:26:27

Re: Java update issue

Post by webnoob » 2021/06/12 19:55:23

Output

[root@minecraft ~]# which java
/usr/bin/java
[root@minecraft ~]# ls -la $(which java)
lrwxrwxrwx. 1 root root 22 11 jun 18:35 /usr/bin/java -> /etc/alternatives/java
[root@minecraft ~]# rpm -qa \*java\) | sort
[root@minecraft ~]#

webnoob
Posts: 37
Joined: 2017/02/01 11:26:27

Re: Java update issue

Post by webnoob » 2021/06/12 19:57:22

More output
[root@minecraft ~]# ls -la /etc/alternatives/java
lrwxrwxrwx. 1 root root 73 11 jun 18:35 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64/jre/bin/java

webnoob
Posts: 37
Joined: 2017/02/01 11:26:27

Re: Java update issue

Post by webnoob » 2021/06/12 20:28:12

Okay I figured out I needed to set java 11 as default, but after doing that I stll can't start my minecraft server.
This is my output

Error: LinkageError occurred while loading main class net.minecraft.server.Main
java.lang.UnsupportedClassVersionError: net/minecraft/server/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 55.0

webnoob
Posts: 37
Joined: 2017/02/01 11:26:27

Re: Java update issue

Post by webnoob » 2021/06/12 20:48:20

Problem solved I installed java 16 server can now start.

Post Reply