Forge Server Tools · every failure mode · guides

java.lang.ExceptionInInitializerError Minecraft mod

A class failed during static initialisation — FATAL

What this actually means

A static field or static block threw while the class was being loaded. The classic case is declaration ORDER: a static block that reads a static field declared further down the file sees null.

How to fix it

Open the named class and read its static fields and static blocks top to bottom. Anything a static block touches must be DECLARED ABOVE it. You can confirm a fix without launching the game: compile, then java -cp build/classes/java/main a tiny main that calls Class.forName("your.Class") -- it reproduces the failure in a second.

What it looks like in your log

Search your crash report or latest.log for any of these:

java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException  ...  <clinit>
NoClassDefFoundError: Could not initialize class

The free edition covers the six most common startup failures, and this is not one of them — it is in the paid tool, which checks all 24 and names the mod jar from the stack trace. The fix above is the same one it prints, so you do not need it to solve this.