Minecraft Forge client 1.12.2 not working on Ubuntu 20.04 (2023)

There are some excellent Minecraft Java Edition mods such as Serene Seasons and Dynamic Trees which provide motivation to run Minecraft Java Edition 1.12.2.Minecraft Bedrock users will find it's well worth buying a new set of Minecraft licenses for Java Edition,in order to experience amazing mods like Ice and Fire and the great variety of choices.

For those that don't know, this only applies to Minecraft Java Edition.Minecraft Bedrock is not mod-able, and to mod Minecraft Java Edition the great Minecraft Forge is also needed.If you only have Minecraft Bedrock, now is the time to re-purchase all your licenses for Java Edition. It's worth it.

Although I'm not sure about the particular errors that the OP reports, I ran into a couple of similar-looking Java errors when trying to install Minecraft Java Edition 1.12.2.I found using Java 8 from scratch for all steps worked with Mac OSX Minecraft server and Ubuntu 20.04 and Windows 10 clients.

For Minecraft Forge 1.12.2, when installing Minecraft server, Minecraft client, and Forge, Java 8 needs to be the system default Java.Multiple Java versions can be run reliably and simultaneously.It's probably easier to run simultaneous versions than uninstalling existing (probably later) Java, which might break something if that's done, anyway.

Also, Minecraft Java Edition needs to be installed first, and run at least once, before attempting the install of Forge, for server and clients.The Forge installer jar needs to be used, not the "universal" jar.

The following instructions detail how to find, install and select Java 8 as default, and install Minecraft Java Edition 1.12.2, and Forge 1.12.2, for Linux, Mac OSX and Windows.

You will need to be able to follow along with CLI bash commands, use sudo when necessary, and understand some basics about your user home directory and Minecraft install directory for your OS.There's plenty of support on-line if you need to search these aspects up.It may be helpful to reboot the machine after some steps; try it if the process seems blocked.

To save the existing installation worlds for restoration later, move the Minecraft installation folder to some neutral location, such as a user home directory, or Documents, etc.The folder being used may be ~/.minecraft, /Library/Application Support/... or in the "roaming directory", for somewhere else.Use drag and drop or do something like mv ~/.minecraft ~/Documents/minecraft-1.16.5.

Comprehensive instructions for finding and installing Java are available: https://petewan.com/blog-post/install-and-manage-multiple-java-jdk-and-jre-versions-on-ubuntu-20-04/

Check what version of Java is installed already, for example:

java -versionopenjdk version "11.0.11" 2021-04-20OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Install Open JDK Java 8:

sudo apt updatesudo apt install openjdk-8-jdk

I didn't use Oracle Java but I thought I would refer to it here in case others need it:

# sudo add-apt-repository ppa:webupd8team/java# sudo apt install oracle-java8-installer# sudo apt install oracle-java8-set-default

Comprehensive instructions for finding and installing Java are available: https://www.dev2qa.com/how-to-install-uninstall-multiple-java-versions-in-mac-os-by-home-brew-or-manually/

Ensure HomeBrew has cask installed:

brew tap homebrew/cask-versions

Use HomeBrew search to discover the names of the Java versions available for installation:

brew search javabrew search jdk

These commands will list helpful names of available HomeBrew installations such as adoptopenjdk8.

  • The brew search command will list "Formulae" and "Casks".
  • Java 8 is likely available only in Casks.
  • Identify a name from the lists that includes "java" or "jdk" followed by "8".

The brew cask command is no longer available, but brew install --cask is, so use that command with the name chosen from the brew search list:

brew install --cask adoptopenjdk8

This command may likely throw an error but will hopefully list other "locations":

Error: Cask adoptopenjdk8 exists in multiple taps:homebrew/cask-versions/adoptopenjdk8caskroom/versions/adoptopenjdk8

Therefore re-try the install using the full path listed, which should be something like one of these:

brew install --cask adoptopenjdk8/openjdk/adoptopenjdk8brew install --cask homebrew/cask-versions/adoptopenjdk8

If using a Windows client, despite Java now being in release 16, I found Java 8 is still the Java used on Windows 10.Nothing to install! Windows is so easy ;)

After installing Java 8 the previous Java is likely to still be the default.Check the alternatives available on the system.Java 8 lists as "1.8":

update-java-alternatives --listjava-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64

Use update-alternatives to select Java 8 as the new default.A prompt will be offered to select a new default Java by pressing a number:

sudo update-alternatives --config javasudo update-alternatives --config javac

If update-alternatives is not available update-java-alternatives --set might be useful.

This may be enough to set Java 8 as the default.In a fresh shell check the current Java version:

java -versionopenjdk version "1.8.0_292"OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10)OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

If there are still problems reaching Java 8 it may help to set the JAVA_HOME environment variable.The canonical path to the current Java can be determined using readlink.Previously it may have returned something like this:

readlink -f /usr/bin/java/usr/lib/jvm/java-11-openjdk-amd64/bin/java

With Java 8 installed it should look more like this:

readlink -f /usr/bin/java/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

Chop off the /jre/bin/java or /bin/java segment to determine the Java home directory.Set that path as the JAVA_HOME environment variable in the shell profile of the user that will be running Minecraft:

export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:jre/bin/java::")

That is to say (these two should be the same but this one is better):

export JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64'

Contrary to some guides, the JAVA_HOME variable does not reference the bin directory.But the bin directory should be referenced in the PATH variable, which could also be added if problems are still happening:

export PATH="$PATH:$JAVA_HOME/bin"

It shouldn't be necessary to use a /jre/bin/ suffix because /jre/bin should be symlinked to /bin as well.

Hopefully java -version will now return Java 8 as required.

After installing Java 8, unless there were no other Javas present before, it will still probably not be the system default.To check which version is being used call Java with the version option in a fresh terminal:

java -version

It may list something like Java 11. Java 8 lists as "1.8".

To make Java 8 the system default the environment needs to be configured to report the correct JAVA_HOME and PATH variables.

Java 8 should now be listed among the known versions of Java as shown by running /usr/libexec/java_home:

/usr/libexec/java_home -VMatching Java Virtual Machines (4):15.0.2, x86_64: "AdoptOpenJDK 15" /Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home1.8.0_292, x86_64: "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Now the JAVA_HOME environment variable needs to be set to the path listed for Java 8 (Java 1.8).Specify this in the bashrc / bash_profile / profile or Zsh profile for the user that is running the server,so that it is set every time the user logs in / starts up.The java_home command can help with this:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8.0_292)

or specify just the major version:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

When done, running a fresh terminal should result in the path to the Java Home directory in the JAVA_HOME variable:

echo $JAVA_HOME/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

Then the PATH variable also needs to be set to include the particular JAVA_HOME bin directory.Again, in the shell profile, set the

PATH="$PATH:$JAVA_HOME/bin"echo $PATH/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin

The current Java version in use should be visible as Java 8 (1.8) when running Java alone in a fresh terminal:

java -versionopenjdk version "1.8.0_292"OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)

As before, this should not be necessary, as Windows is still using Java 8.

The official Minecraft server JAR for 1.12.2 is available here: https://www.minecraft.net/en-us/article/minecraft-1122-releasedDownloading from the link on that page should provide minecraft_server.1.12.2.jar.Run the JAR file to install it, using the newly installed Java 8:

java -jar minecraft_server.1.12.2.jar

This operation should be the same for Linux, Mac, and even Windows.

Remember, it will be necessary to run the Minecraft JAR twice.The first time it will generate some files and then drop out because the EULA is not signed.Edit eula.txt to read eula=true and then re-run to make sure Minecraft Java Edition server runs.

I've read that Minecraft server is not necessary when running Forge as a server, since Forge handles everything.However, this is the route I took and it worked for me.

There are two executables involved in running Minecraft as a client: the Launcher and the game.This is important because the game needs to be installed before Forge is installed, and only playing the game will trigger download and install of that version of the game from the Launcher.

The official Minecraft Launcher is available here: https://www.minecraft.net/en-us/downloadThe page has links for a Mac DMG installer, and a Windows MSI installer.Of course, it can also be downloaded directly from the command line on Linux:

wget -o ~/Minecraft.deb https://launcher.mojang.com/download/Minecraft.deb

Install the Launcher as normal for Mac and Windows.For Ubuntu Linux this will work for installing a DEB package:

sudo dpkg -i Minecraft.deb

And list where the Launcher has installed:

ls /var/lib/dpkg/info/minecraft-launcher.*dpkg -L minecraft-launcher/usr/bin/minecraft-launcher/usr/share/applications/minecraft-launcher.desktop/usr/share/icons/hicolor/symbolic/apps/minecraft-launcher.svg...
sudo apt list --installed | grep craftminecraft-launcher/now 928 amd64 [installed,local]

When downloading the game in the Launcher be patient.Microsoft is only a small company with few resources and it may take some time, and even one or more re-tries, to download the game from their server.It may also be necessary to re-boot afterwards.

When Minecraft Launcher is first installed there are no Minecraft games available on the system.I found that playing latest Minecraft single player was a necessary step in order to unlock the previous versions in the Minecraft Launcher Installations.So play Minecraft single player!

The Launcher should offer a play button, and clicking it will download, install and run the latest Minecraft Java Edition game, now within Java 8.This should be the same on Linux, Mac and Windows.

Again, on Linux, Mac and Windows the same process should be possible.After playing latest Minecraft from the Launcher, apart from installing the latest Minecraft client, the Launcher should now offer previous versions of the Minecraft game client.

(Apparently Minecraft server installer can be downloaded from here as well, but I didn't try it.)

For Windows it may be necessary to use Settings > General > Show historical versions of Minecraft Java Edition in the Launcher to unlock the previous versions.

  • Run the Minecraft Launcher but do not play a game
  • Change to the "Installations" tab in the Launcher
  • Click on "New Installation" and select 1.12.2 in the versions menu
  • Save this new installation and select it to play Minecraft 1.12.2

Now play vanilla Minecraft again from the Launcher - this time version 1.12.2.This action will download and install Minecraft 1.12.2 on the client machine.

At this point old-fashioned vanilla Minecraft Java Edition 1.12.2 is available as game clients and server.I guess it's worth checking this works by attempting a 1.12.2 vanilla network game to the server.

It's now time for Forge.

The Forge 1.12.2 installer is available on the official web site.Make sure to click on the "Installer" icon. "Universal" or some such won't work: https://files.minecraftforge.net/net/minecraftforge/forge/index_1.12.2.html

This operation is not totally trivial. Avoid all links after redirect, and wait for the "skip" button to appear top-right.I won't detail click-by-click instructions here, but they are available: https://www.alphr.com/install-minecraft-forge-windows-mac/

  • For each client and server place the downloaded Forge installer JAR in the Minecraft directory (this may not be necessary but that's what I did).
  • The java -version call should confirm the default Java is Java 8.
  • On Linux run a precautionary sudo apt update and sudo apt upgrade before proceeding.
  • Run the Forge JAR file (on Windows double-clicking it should be sufficient): java -jar forge-1.12.2-
  • When the GUI pops up select "Install client" or "Install server" as appropriate for that machine.

After installation there should be a new Forge JAR file that is not named "installer":


For Minecraft server it should now be possible to run the new Forge JAR.This is the short script I use to start our family Minecraft Forge on Mac OS,setting the environment variables as well, as a precaution:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)export PATH="$PATH:$JAVA_HOME/bin"cd /Users/family/Minecraftexec java -Xms512M -Xmx2048M -XX:+UseG1GC -jar forge-1.12.2- nogui

For the client, after starting Minecraft Launcher, use the "Installations" tab again.Create a new installation and find the new Forge 1.12.2 entry in the menu to select for a release.

Playing Minecraft from this installation should now be sufficient to find and access the Forge 1.12.2 server.

Just drop the same mod JAR files in the server and client "mods" directories to quadruple, quintuple, and decuple the value you get from the game!


Minecraft Forge client 1.12.2 not working on Ubuntu 20.04? ›

Try running sudo update-alternatives --config java and type the number of Java 8 to set as default, then try starting Forge again. That fixed the problem for me, as Forge versions 1.12. 2 are only compatible with Java 8.

Why can't I open Forge 1.12 2? ›

The problem is most likely due to a to recent version of Java, Forge 1.12. 2 cannot be run on Java versions superior to Java 8. Install Java 8 on your system and use it to start the server. Here is the documentation page of PufferPanel that tells you how to handle multiple Java versions.

What JDK does Minecraft 1.12 2 use? ›

"Starting from Minecraft 1.12, Java 8 will be required to run Minecraft.

Why is my Minecraft launcher forge not working? ›

One common reason for Minecraft Forge Not Working is that you install the Windows version of the game on your computer while Forge only runs in the Java version of the game. In addition, the Java version should match the version of the game. Otherwise, Forge won't work either.

What version of Java do I need for Minecraft Forge 1.12 2? ›

From Java Edition 1.12(17w13a) to Java Edition 1.16. 5(1.17: 21w18a), Minecraft requires Java 8 (1.8. 0) or newer.

Top Articles
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated: 01/12/2023

Views: 5721

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.