Getting minecraft to run on recent versions of java

I recommend asdf, It’s a manager to manage multiple different versions of many different programming related tools, java of which being one, It makes it extremely easy. You can go through the instructions and do everything yourself if you want to, or you can just run these commands (should be able to just copy paste them, these are typed from memory on my phone so hopefully accurate, lol):

sudo apt install curl git # Install asdf dependencies
git clone https://github.com/asdf-vm/asdf.git $HOME/.asdf --branch v0.8.0 # Acquire asdf
source $HOME/.asdf/asdf.sh # Register asdf into your current shell session

At this point you have asdf, It’s recommended to add both of these lines into your .bashrc or equivalent file

source $HOME/.asdf/asdf.sh
source $HOME/.asdf/completions/asdf.bash

That way it will be in your Shell sessions with completions. Next you want to install Java, 1.8 specifically, so first you need the Java asdf plugin:

asdf plugin add java

If you’re curious you can list all installable Java versions with:

asdf list all java

But in this case you just want:

asdf install java adoptopenjdk-8.0.292+10

There are other varieties and builds of Java 1.8 as well, like Zulu or j9 or so forth, but that’s the bug standard JDK you would normally get anywhere.

Now at this point you can set it default system wide for your user with:

asdf global java adoptopenjdk-8.0.292+10

Or you can do it just in a specific directory tree by going to that directory tree and running:

asdf local java adoptopenjdk-8.0.292+10

Or if you just want to have something use it directly, like MultiMC you can point to a specific Java installation, Well it will be installed somewhere in your $HOME/.asdf/installs/java then in the directory for whichever Java version that you want it to use, it’s a standard Java directory, so you access it like any other Java directory.

There are other ways as well, but environment managers like asdf are so crazy useful. It has a huge list of official plugins that you can see with asdf plugin list all, or you can install third party plugins via a direct git repository. It’s also all entirely self-contained so if you just want it gone you can just delete $HOME/.asdf

2 Likes