Invalid or Corrupt JAR

The server will not start and Java reports the jar file itself as invalid or corrupt. The download or upload was incomplete, or the file is not actually the jar you think it is.

O que significa este erro?
A jar is a zip archive Java reads at launch. 'Invalid or corrupt jarfile' means the archive is truncated, damaged, or not a real jar at all, often an HTML error page that was saved with a .jar name.
Error: Invalid or corrupt jarfile
Causas mais comuns
  • An interrupted or incomplete download.
  • A file transfer in text mode that mangled the binary.
  • An HTML error page saved as server.jar (e.g. from a broken link).
  • Disk corruption on the server.
  • The wrong file uploaded entirely.
Como diagnosticar
  1. Compare the file size against the official download, a tiny file is a red flag.
  2. Run 'unzip -t server.jar' (or open it in an archive tool), a valid jar lists entries.
  3. Verify a published checksum/hash if the project provides one.
  4. Open the file in a text editor, if you see HTML, it is not a jar.
Correções recomendadas
  • Re-download from the source
    Get a fresh copy from the official site (PaperMC, Fabric, Forge, Mojang) rather than a mirror.
  • Upload in binary mode
    When using FTP, transfer the jar in binary mode so it is not altered.
  • Verify the checksum
    Match the file hash to the published one to confirm an intact download.
  • Confirm the correct file
    Make sure you uploaded the server jar, not an installer or a mod.
Perguntas frequentes

Use the official source for your software: PaperMC, FabricMC, MinecraftForge, or Minecraft.net.

Run 'unzip -t' on it. A valid jar lists its contents without errors.

A dead or redirecting download link sometimes saves the error webpage under the jar filename.