无法启动游戏服务器

无法启动游戏服务器

我尝试按照这里的说明来运行游戏...

https://www.minecraft.net/en-us/download/server

但出现此错误:

# java -Xmx1024M -Xms1024M -jar server.jar  nogui
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

我使用以下方式安装 JDK:

apt install openjdk-11-jdk-headless

我正在使用 ARM Ubuntu EC2 实例。


更新:

成功安装 Java。但这次出现了不同的错误 :)

[04:40:16] [Server thread/INFO]: Starting minecraft server version 1.17.1
[04:40:16] [Server thread/INFO]: Loading properties
[04:40:16] [Server thread/INFO]: Default game type: SURVIVAL
[04:40:16] [Server thread/INFO]: Generating keypair
[04:40:16] [Server thread/INFO]: Starting Minecraft server on 18.210.57.140:25564
[04:40:16] [Server thread/INFO]: Using default channel type
[04:40:16] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[04:40:16] [Server thread/WARN]: The exception was: java.net.BindException: Cannot assign requested address
[04:40:16] [Server thread/WARN]: Perhaps a server is already running on that port?
[04:40:16] [Server thread/INFO]: Stopping server
[04:40:16] [Server thread/INFO]: Saving worlds
[04:40:16] [Server thread/ERROR]: Exception stopping the server
java.lang.NullPointerException: Cannot invoke "abr.o_()" because "☃" is null
        at net.minecraft.server.MinecraftServer.a(SourceFile:588) ~[server.jar:?]
        at net.minecraft.server.MinecraftServer.u(SourceFile:624) ~[server.jar:?]
        at aas.u(SourceFile:585) ~[server.jar:?]
        at net.minecraft.server.MinecraftServer.x(SourceFile:734) ~[server.jar:?]
        at net.minecraft.server.MinecraftServer.a(SourceFile:270) ~[server.jar:?]
        at java.lang.Thread.run(Thread.java:831) [?:?]

相关内容