Score:0

How to run Minecraft 1.18.x in (k)ubuntu 20.04 / java 17 throwing errors

tr flag

How do I get Minecraft 1.18.x to run? I have openjdk-17 installed and Minecraft 1.16.x runs fine with openjdk-8.

The relevant errors in the console are:

[16:37:00 ERROR]: Game ended with bad state (exit code 1)

Unrecognized VM option 'CMSIncrementalMode' Error: Could not create the Java Virtual Machine.

Unrecognized VM option 'UseConcMarkSweepGC' Error: Could not create the Java Virtual Machine.

Hint: solved below

user535733 avatar
cn flag
It's unclear how this question is different from those others listed in your answer. Perhaps you should add answers to some of those questions, too.
Score:0
tr flag

If you're reading this it's because none of these worked for you:

JVM errors when running minecraft

Problems updating Java on Ubuntu 20.04 for Minecraft 1.18

How to install Java 18 (JRE) on Ubuntu LTS 20.04

I'm running Kubuntu 20.04 / kernel 5.13.0-28-generic with openjdk-8 and openjdk-17 installed.

I'm also running Minecraft Launcher v 1.6.93 because I like it.

Solution:

1- Remove openjdk-17

sudo apt remove openjdk-17-*

2- Get Oracle's Java 17

wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.deb

3- Install dependencies first

sudo apt install libc6-i386
sudo apt install libc6-x32

4- Install Java 17

sudo dpkg -i jdk-17_linux-x64_bin.deb

5- Open your Minecraft launcher and set the Java Settings: Executable to the correct path. In my install it's:

/usr/lib/jvm/jdk-17/bin/java

and remove all JVM arguments that give problems.

6- Save your profile and play

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.