Javac for Building the PrismLauncher on Ubuntu

I peridocially fall of the wagon and get drawn back into playing Minecraft. I’ve decided that, in order to make this time not wasted, I need to do something constructive with this urge. Last time I played Minecraft, I found the MultiMC launcher would no longer work. Being a fan of C++ and open source projects, I was not happy with this state. A friend suggested I try the PrismLauncher fork of the code base.

Prism does not seem to have a native Debian based build available, although I admit I did not look very hard. I don’t want to install flatpacks or other binary management software just for one app. So, I figured I would build from sources.


I have cloned the repo and checked out the latest release version. Following the instructions failed fairly quickly with the error:

error: Target option 7 is no longer supported. Use 8 or later.

This was after a long line of Java based commands, I assumed it had to do with the fact that my machine is running Open JDK V 21 and we needed something older: the build instructions say Java -17, which I also have installed.

For this, I had to switch the javac compiler set by default, using the alternatives framework:

For the Java Exe this is

sudo update-alternatives –config java
There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-21-openjdk-amd64/bin/java 2111 auto mode
1 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 manual mode
2 /usr/lib/jvm/java-21-openjdk-amd64/bin/java 2111 manual mode
3 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode


And for the Javc compiler

sudo update-alternatives –config javac
There are 2 choices for the alternative javac (providing /usr/bin/javac).

Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-21-openjdk-amd64/bin/javac 2111 auto mode
1 /usr/lib/jvm/java-17-openjdk-amd64/bin/javac 1711 manual mode
2 /usr/lib/jvm/java-21-openjdk-amd64/bin/javac 2111 manual mode


I then needed to switch them back in order to run, as MInecraft needs a version later than 17 (suggested 21).



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.