GDLauncher logo

How to Manage Java Versions and Per-Instance Overrides in GDLauncher

Add custom Java installations, create profiles, and set a per-instance Java override so each modpack runs on the right Java version automatically.

Updated: May 2026

The Java situation in Minecraft

Minecraft requires different Java versions depending on its own version: 1.16 and earlier need Java 8, 1.17 needs Java 16, 1.18 through 1.20.4 need Java 17, and 1.20.5+ needs Java 21. Mods compile against a specific Java version. A mod built for Java 17 cannot run on a Java 8 JVM (the bytecode is too new). The reverse direction technically works at the bytecode level, but in practice old Minecraft modloaders (Forge 1.12.2, etc.) don't support modern Java versions, so each MC version still wants a matching Java.

GDLauncher solves this with two things: managed Java installations (it can download the right Java per Minecraft version automatically) and per-instance overrides (you can force a specific Java for one instance).

Managed vs custom Java

Managed: GDLauncher downloads and installs the Java itself, from Azul's Zulu builds. The install lives inside the runtime path under managed_javas/. You can remove it later with the trash icon if you want to free up disk space.

Custom: You point at a Java already installed on your system (Adoptium Temurin, Oracle JDK, GraalVM, whatever). GDLauncher only validates the path; it doesn't manage the install. Useful if you already have a tuned JDK you want to use.

System-discovered Javas (the ones GDLauncher finds without you doing anything) can't be deleted from the launcher because GDLauncher doesn't own them.

Profiles

A profile is a named "use this Java when something asks for the Foo runtime" rule. The system profiles match Mojang's Java runtime tiers (Legacy for Java 8, Alpha for Java 16, Beta/Gamma for Java 17, Delta for Java 21, Epsilon for Java 25). With the auto-manage toggle on, GDLauncher picks the right Java for each tier on its own. With it off, you assign them yourself. Custom profiles let you give a specific path a name to reference from instance overrides.

Most people don't need custom profiles. System profiles plus auto-management cover the common case.

Per-instance override

In Instance Settings, the Java Path/Profile section has a toggle. Off (default): the instance uses whichever Java the launcher picks based on the Minecraft version (via system profiles). On: you specify either a Path (a literal file) or a Profile (a named profile).

When you'd want an override:

  • The modpack explicitly says "must run on Java X.Y.Z" and you want to pin it.
  • You're testing a JVM (GraalVM, Liberica NIK) and want to try it on one instance without changing your default.
  • You have multiple Java 17 installs (Adoptium, Microsoft, etc.) and want to pick a specific one.

Checking which Java actually got used

Right-click the instance → View Logs after a launch. The launcher log lists the full Java executable path it called. Match that against your expected override.

Common Java errors

  • UnsupportedClassVersionError: the mod or server was built for a newer Java than the one running. The error includes a "class file version" number; 61.0 means Java 17, 65.0 means Java 21. Switch to a newer Java via profile or override.
  • "Could not reserve enough space for object heap": you're using a 32-bit Java (limited to roughly 1.5 GB heap on Windows), or asking for more contiguous memory than the system can give. Confirm you've installed a 64-bit JDK and that's the one the override points at; if it still fails, lower the RAM slider.
  • "Could not find or load main class": usually a broken or partial mod loader install (Forge, NeoForge, Fabric), missing libraries or jvm args files, not Java itself. Reinstall the loader from the instance settings, or recreate the instance. If it persists after that, try a different Java in the override.

Ready to Try GDLauncher?

Download GDLauncher and start playing modded Minecraft in minutes. One-click install for modpacks, mods, and more.

Download GDLauncher