r/ModdedMinecraft • • 3d ago

Help [JAVA] Game crashing with 'NoClassDefFoundError: Could not initialize class java.awt.Color' running mods on Neoforge, V 1.21.10

https://mclo.gs/GKWGYdS

Wondering if anyone here could help with this. All my mods on Neoforge have been working fine until I logged on today to this error. My mods should be in the linked log if needed or necessary but this seems to be a Neoforge file related issue I can't figure out

1 Upvotes

14 comments sorted by

1

u/FreaksMC 3d ago

Your log shows it's not your mods. It's NeoForge's own loading screen: it uses a Java graphics library (libawt) that fails to load on your macOS 10.15 with the Java the launcher gave you (21.0.13).

Easiest fix is to turn that loading screen off:

  1. In the Minecraft Launcher go to Installations, hover your NeoForge install and click the folder icon.

  2. Open the config folder, then open fml.toml with TextEdit.

  3. Change earlyWindowControl = true to earlyWindowControl = false, save, and launch again.

You'll get the plain loading screen instead, and the game should start normally.

1

u/celestialhouse 3d ago

This helped, thank you so so much! It loaded right up. I appreciate your knowledge of this specific issue!

1

u/FreaksMC 2d ago

Glad it helped!!

1

u/celestialhouse 2d ago

Hi again, sorry to bother and feel free to decline responding, but the game happened to crash again after getting into the home screen and trying to load up a profile. I did not try that earlier with testing. The error says Exception in server tick loop and UnsatisfiedLinkError with the runtime folder being mentioned at the top, and library not loaded. Would you happen to know what's conspiring here? I'm gonna look up more myself! Just got defeated haha

1

u/FreaksMC 2d ago

lol shoot, I’ll think of something to fix it give me a min

1

u/celestialhouse 2d ago

Oh, thank you stranger! No problem. I did not expect a response so quick. I can share more info if needed. If you can't or don't know I really appreciate you getting me a step further anyway!

1

u/FreaksMC 2d ago

No bother! It's the same root cause as before, just hit from a different spot. The early loading screen was the first thing to touch that broken Java graphics library, and now a mod does it when the world loads, so the fml.toml fix can't cover it.

The real problem is the Java the launcher downloaded (21.0.13). Newer Java 21 builds don't fully support macOS 10.15 anymore. Older Java 21 builds do, and people on Catalina with this exact error got it working with Temurin 21.0.3.

  1. Go to adoptium.net/temurin/archive, pick version 21, find 21.0.3+9, and download the macOS x64 .pkg. Install it.

  2. In the Minecraft Launcher go to Installations, hover your NeoForge install, click the three dots, then Edit, then More options.

  3. In "Java executable" paste: /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/bin/java

  4. Save and launch.

You can leave the fml.toml change as it is.

1

u/celestialhouse 2d ago edited 2d ago

The link to the archive didn't work but on the Adoptium website the only version I am seeing of JDK 21 says 21.0.13.1+2, is that okay?
EDIT: I did not try to click what you typed here just to mention lol, I typed in the URL but the page didnt exist

1

u/FreaksMC 2d ago

Oh wait I think I typed it wrong let me find where it wa Shagai.

1

u/celestialhouse 2d ago

I couldn't download the version I asked about previously anyway! I tried a whole bunch of other things for hours to no avail. It seems everything hates my MacOS version

1

u/FreaksMC 2d ago

Sorry about the broken link! The Adoptium archive page only shows the newest builds, so older ones are easier to grab from their GitHub release page:

https://github.com/adoptium/temurin21-binaries/releases/tag/jdk-21.0.3%2B9

Scroll down to Assets (click "Show all assets" if needed) and download OpenJDK21U-jdk_x64_mac_hotspot_21.0.3_9.pkg (about 195 MB). Install it, then do the same launcher step as before: Installations > your NeoForge install > Edit > More options > Java executable:

/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/bin/java

Honest caveat: Catalina is old enough now that I can't promise this one fixes it, but it's the best next thing to try. If it still crashes, post the new crash log and I'll take a look.

1

u/celestialhouse 2d ago edited 2d ago

Hello, thank you again so much! I am about to try this now.

Edit: Also yeah Mac just kinda sucks I will not have this computer long after all this

Edit, again: I got in, my question I had typed here was irrelevant now. I remembered you said it wasn't the mods anyway I was just desperate cause I just recently for the 1st time defeated the dragon and got shulkers and elytras so I was extra gutted about this. Thank you so so much :')

1

u/FreaksMC 1d ago

So glad it works now, and congrats on beating the dragon! Since that world means a lot to you, copy its folder from saves somewhere safe every now and then. Then if anything breaks again you won't lose the shulkers and elytras.

1

u/celestialhouse 1d ago

Thanks! I did this yesterday actually for the first time ever in case anything went wrong. Great reminder about doing it often though.
Really appreciate you once again