Black Friday: first month 50% off on monthly plans, or your first month free when you pay per quarter. Until Monday 30 November 23:59. See the plans Conditions
New customers: first month 50% off monthly plans, until 30 Nov
New here? Try a Minecraft server or Discord bot free for 24 hours. Try free
ServerSparkServerSpark

Knowledge base

Change your Minecraft server's Java version

Which Java version your Minecraft version or modpack needs, and how to switch it in SparkPanel in one minute.

NVMe nodesNightly backupsOnline in minutes

Updated 30 November 2026

Every Minecraft server runs on Java, and each Minecraft version needs a certain Java version. When your server or a mod says "requires Java 21" (or 17, or 25), you switch it yourself in SparkPanel. It takes a minute.

How to switch the Java version

  1. Open your server in SparkPanel.
  2. Go to Settings and find the block Version (Java / runtime).
  3. Choose the Java version you need and save.
  4. Restart your server.

Your files and world stay as they are; only the Java version the server starts with changes.

Which Java version do I need?

Minecraft versionJava version
26.1 and newerJava 25
1.20.5 to 1.21.xJava 21
1.18 to 1.20.4Java 17
1.17Java 16 or 17
1.16.5 and olderJava 8 (some modpacks: Java 11)

Modpacks and mods follow the Minecraft version they are made for. If a mod's page names a Java version, use that one.

Typical messages

  • "Unsupported class file major version" or "has been compiled by a more recent version of the Java Runtime": your Java version is too old. Choose a newer one.
  • A mod says it needs an older Java (for example Java 21 while the server runs Java 25): choose that version.
Still stuck? Open a ticket and we'll set it for you.