Fix: "AOT cache was created by a different version of HotSpot"
You start your Hytale server and get this:
[0.004s][warning][aot] The AOT cache was created by a different version or build of HotSpot
[0.004s][error ][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details.
[0.004s][error ][aot] Loading static archive failed.
[0.004s][error ][aot] Unable to map shared spaces
The server still starts, but without AOT - meaning a slower boot and a lag spike during the first few minutes while the JVM warms up. Here’s what’s going on and how to fix it.
Why This Happens
The HytaleServer.aot file that ships with the server is a pre-compiled cache built by Java 25’s AOT system (JEP 483). It contains pre-loaded classes and native code so the JVM can skip its warmup phase on startup.
The problem: this cache is locked to the exact JDK that created it. Not just the same major version - the same distribution, version, and build number. If any of these don’t match, the JVM rejects the cache.
Hypixel builds the shipped .aot against a specific Eclipse Temurin build. If you installed Java from your distro’s package manager, or grabbed a different Temurin build, the cache won’t load.
Check what you’re running:
java -version
You’ll see something like:
openjdk version "25.0.1" 2026-04-15
OpenJDK Runtime Environment Temurin-25.0.1+9 (build 25.0.1+9)
OpenJDK 64-Bit Server VM Temurin-25.0.1+9 (build 25.0.1+9, mixed mode)
The build that matters is the full string - Temurin-25.0.1+9. If the shipped .aot was built with Temurin-25.0.2+10, it won’t work.
Fix 1: Regenerate the Cache for Your JDK
The simplest fix. Delete the old cache and build a new one against whatever JDK you have installed.
One-Step Method
rm HytaleServer.aot
java -XX:AOTCacheOutput=HytaleServer.aot -jar HytaleServer.jar --assets ../Assets.zip --bind 5520
This starts the server in training mode. Let it fully boot, ideally let a player join and move around for a bit, then shut down gracefully with /stop. The .aot file gets written on exit.
Then start normally:
java -Xms4G -Xmx4G -XX:AOTCache=HytaleServer.aot -jar HytaleServer.jar --assets ../Assets.zip --bind 5520
Memory note: The one-step method roughly doubles heap usage internally. If you pass -Xmx4G, you need ~8 GB of free system RAM. If that’s tight, use the two-step method.
Two-Step Method
Record a training run:
java -XX:AOTMode=record -XX:AOTConfiguration=HytaleServer.aotconf \
-jar HytaleServer.jar --assets ../Assets.zip --bind 5520
Let the server run, simulate some activity, then /stop.
Build the cache:
java -XX:AOTMode=create -XX:AOTConfiguration=HytaleServer.aotconf \
-XX:AOTCache=HytaleServer.aot -cp HytaleServer.jar
This reads the training data and assembles the cache without starting the server. Takes a few seconds.
Docker
If you’re using the Hybrowse hytale-server-docker image, set:
environment:
ENABLE_AOT: generate
The container generates the cache and exits. Then switch to ENABLE_AOT: auto for normal operation.
Fix 2: Match the JDK
Instead of regenerating, you can install the exact Temurin build the shipped .aot was built against. This way the cache works as-is.
Download Eclipse Temurin 25 and check the version against what the server expects. If you used our Debian 13 guide, the Adoptium APT repo should give you the right build - just make sure it’s up to date:
sudo apt update && sudo apt upgrade temurin-25-jdk
After Every Server Update
When Hypixel pushes a new HytaleServer.jar, the old .aot cache is invalid. The new download should include a matching one. If it doesn’t, or if you regenerate your own, delete and rebuild:
rm HytaleServer.aot
java -XX:AOTCacheOutput=HytaleServer.aot -jar HytaleServer.jar --assets ../Assets.zip --bind 5520
Quick reference for the flags mentioned in this article:
| Flag | Purpose |
|---|---|
-XX:AOTCache=file.aot | Load an existing AOT cache |
-XX:AOTCacheOutput=file.aot | Generate a new cache (one-step) |
-XX:AOTMode=record | Training run for two-step generation |
-XX:AOTMode=create | Build cache from training data |
-XX:AOTConfiguration=file.aotconf | Training data file for two-step |
-Xlog:aot | Detailed AOT debug logging |