PolyMC / PolyMC

A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)

Home Page:https://polymc.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Launch instance failed: This instance is not compatible with Java version 21

evan0greenup opened this issue · comments

Operating System

Linux

Version of PolyMC

6.0

Version of Qt

6.6.1

Description of bug

When launch a the latest Vanilla Minecraft instance, it cannot launch

and print the following output

This instance is not compatible with Java version 21.
Please switch to one of the following Java versions for this instance:
Java version 17
Java version 18
Java version 19

The same instance can be launched in MultiMC.

Steps to reproduce

Create a vanilla 1.20.4 instance, and Launch.

Suspected cause

Before 6.0, PolyMC cannot even build with java-21. Probably, the porting work to Java 21 is not done thoroughly. Some code still use Old java-7 code. which is incompatible with latest java-21.

This issue is unique

  • I have searched the issue tracker and did not find an issue describing my bug.

Full log

PolyMC version: 6.0


Launched instance in online mode

authserver.mojang.com resolves to:
    [13.35.147.89, 13.35.147.73, 13.35.147.121, 13.35.147.61]

session.minecraft.net resolves to:
    [13.107.213.31, 13.107.246.31, 2620:1ec:46::31, 2620:1ec:bdf::31]

textures.minecraft.net resolves to:
    [13.107.246.31, 13.107.213.31, 2620:1ec:bdf::31, 2620:1ec:46::31]

api.mojang.com resolves to:
    [13.107.246.31, 13.107.213.31, 2620:1ec:46::31, 2620:1ec:bdf::31]


Minecraft folder is:
/home/myusername/.local/share/PolyMC/instances/Vanilla 1.20/.minecraft


Java path is:
/usr/lib/jvm/java-21-openjdk/bin/java


Checking Java version...
Java is version 21, using 64 (amd64) architecture, from N/A.


... HARDWARE INFO (skip) ...

Main Class:
  net.minecraft.client.main.Main

Native path:
  /home/myusername/.local/share/PolyMC/instances/Vanilla 1.20/natives

Traits:
traits XR:Initial
traits FirstThreadOnMacOS

Libraries:
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-glfw-natives-linux/3.3.2/lwjgl-glfw-natives-linux-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-glfw/3.3.2/lwjgl-glfw-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-jemalloc-natives-linux/3.3.2/lwjgl-jemalloc-natives-linux-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-jemalloc/3.3.2/lwjgl-jemalloc-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-natives-linux/3.3.2/lwjgl-natives-linux-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-openal-natives-linux/3.3.2/lwjgl-openal-natives-linux-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-openal/3.3.2/lwjgl-openal-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-opengl-natives-linux/3.3.2/lwjgl-opengl-natives-linux-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-opengl/3.3.2/lwjgl-opengl-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-stb-natives-linux/3.3.2/lwjgl-stb-natives-linux-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-stb/3.3.2/lwjgl-stb-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-tinyfd-natives-linux/3.3.2/lwjgl-tinyfd-natives-linux-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl-tinyfd/3.3.2/lwjgl-tinyfd-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/org/lwjgl/lwjgl/3.3.2/lwjgl-3.3.2.jar
  /home/myusername/.local/share/PolyMC/libraries/com/github/oshi/oshi-core/6.4.5/oshi-core-6.4.5.jar
  /home/myusername/.local/share/PolyMC/libraries/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar
  /home/myusername/.local/share/PolyMC/libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
  /home/myusername/.local/share/PolyMC/libraries/com/google/guava/guava/32.1.2-jre/guava-32.1.2-jre.jar
  /home/myusername/.local/share/PolyMC/libraries/com/ibm/icu/icu4j/73.2/icu4j-73.2.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/authlib/6.0.52/authlib-6.0.52.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/brigadier/1.2.9/brigadier-1.2.9.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/datafixerupper/6.0.8/datafixerupper-6.0.8.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/logging/1.1.1/logging-1.1.1.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/patchy/2.2.10/patchy-2.2.10.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar
  /home/myusername/.local/share/PolyMC/libraries/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar
  /home/myusername/.local/share/PolyMC/libraries/commons-io/commons-io/2.13.0/commons-io-2.13.0.jar
  /home/myusername/.local/share/PolyMC/libraries/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-buffer/4.1.97.Final/netty-buffer-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-codec/4.1.97.Final/netty-codec-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-common/4.1.97.Final/netty-common-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-handler/4.1.97.Final/netty-handler-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-resolver/4.1.97.Final/netty-resolver-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-transport-classes-epoll/4.1.97.Final/netty-transport-classes-epoll-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-aarch_64.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-x86_64.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-transport-native-unix-common/4.1.97.Final/netty-transport-native-unix-common-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/io/netty/netty-transport/4.1.97.Final/netty-transport-4.1.97.Final.jar
  /home/myusername/.local/share/PolyMC/libraries/it/unimi/dsi/fastutil/8.5.12/fastutil-8.5.12.jar
  /home/myusername/.local/share/PolyMC/libraries/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar
  /home/myusername/.local/share/PolyMC/libraries/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar
  /home/myusername/.local/share/PolyMC/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar
  /home/myusername/.local/share/PolyMC/libraries/org/apache/commons/commons-compress/1.22/commons-compress-1.22.jar
  /home/myusername/.local/share/PolyMC/libraries/org/apache/commons/commons-lang3/3.13.0/commons-lang3-3.13.0.jar
  /home/myusername/.local/share/PolyMC/libraries/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar
  /home/myusername/.local/share/PolyMC/libraries/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar
  /home/myusername/.local/share/PolyMC/libraries/org/apache/logging/log4j/log4j-api/2.19.0/log4j-api-2.19.0.jar
  /home/myusername/.local/share/PolyMC/libraries/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar
  /home/myusername/.local/share/PolyMC/libraries/org/apache/logging/log4j/log4j-slf4j2-impl/2.19.0/log4j-slf4j2-impl-2.19.0.jar
  /home/myusername/.local/share/PolyMC/libraries/org/joml/joml/1.10.5/joml-1.10.5.jar
  /home/myusername/.local/share/PolyMC/libraries/org/slf4j/slf4j-api/2.0.7/slf4j-api-2.0.7.jar
  /home/myusername/.local/share/PolyMC/libraries/com/mojang/minecraft/1.20.4/minecraft-1.20.4-client.jar

Native libraries:

Params:
  --username  --version 1.20.4 --gameDir /home/myusername/.local/share/PolyMC/instances/Vanilla 1.20/.minecraft --assetsDir /home/myusername/.local/share/PolyMC/assets --assetIndex 12 --uuid  --accessToken  --userType  --versionType release

Window size: 854 x 480

This instance is not compatible with Java version 21.
Please switch to one of the following Java versions for this instance:
Java version 17
Java version 18
Java version 19

For now you can just enable the option to skip the compatibility check, I'll figure out how to fix this soon.

If anyone is facing this even after selecting "Skip Java Compatibility Check" from PolyMC settings, read:

Apparently there are two "Skip java compatibility check" settings.

You have to select the "Skip java compatibility check" from instance settings, not the main settings. Because the one in the main settings does nothing (Probably another bug?).