Run Minecraft 1.12.2 on Java 21

Thursday, January 1st 1970

Attention: Only works with Prism/MultiMC launcher

1. Pre-requisites

2. Setup CleanroomMC

CleanroomMC is a mod loader for Minecraft 1.12.2, it comes with some new features and optimizations.

  • Firstly, we need to download CleanroomMC. CleanroomMC instance can be downloaded here. Don't forget to download the latest version.
  • After downloading, in Prism, Add Instance -> Import -> Cleanroom_MMC.zip.
  • Then, choose Edit the instance -> Settings -> Java Installation ➜ Set to your Java path to Java 21 path.
  • Finally, launch the instance and enjoy!

3. Setup CleanroomMC for modpacks

If you want to use CLeanroom instead of Forge, here is the tutorial.
I'll call your modpack instance is alpha and Cleanroom instance is beta.

  • Before continue, please make sure you finished the setup of CleanroomMC (Step 2).
  • Firstly, remove all folders in the beta minecraft folder.
  • Then, copy all folders from the alpha minecraft folder to the beta minecraft folder.
  • Next, you need to download Fugue and Scalar
  • Put them in the mods folder of the beta instance.
  • Finally, launch the beta instance and enjoy! (you can delete alpha instance)

4. Frequently Asked Questions

Too many Java distributions, what should I use?

Most of Java distributions are compatible with Minecraft so you can use any of them. However, some distributions have better performance than others, GraalVM, for instance.

I personally suggest using GraalVM.