Direct answer
Replace incomplete or incorrect downloads and verify the startup command points at the actual server JAR.
Diagnosis to use: Java’s “Invalid or corrupt jarfile” means the named file cannot be read as the JAR archive expected by the Java launcher.
What it means
The Java launcher cannot read the target file as a valid JAR archive, commonly because the download/transfer is incomplete, the wrong artifact was saved, or the file is damaged.
What to collect: Run java -version, inspect the file size, and check the download source. If file server.jar identifies HTML or plain text, you may have downloaded a web error page instead of the server JAR.
If you are a player
- This is a server-side startup problem. Send the owner the exact panel/console error; reinstalling your game client will not fix it.
If you run the server
- Run the startup command from the intended server directory and verify every referenced JAR/path exists with the exact filename.
- If the JAR is corrupt/incomplete, download it again from the official project source rather than renaming a different artifact.
- Simplify wrappers/start scripts until a minimal supported
java -jar …launch works, then re-add panel/wrapper arguments. - Do not delete worlds/plugins for an error that happens before the Minecraft server JAR is successfully opened.
Targeted repair: Redownload from the software project’s official distribution URL; do not rename an installer ZIP or a modpack archive to .jar and expect it to run. Verify the checksum if published.
Verify after the change: Launch the downloaded JAR with the documented command on a new empty test directory; only then move its verified build into your server environment.
References
Use the documentation for the exact software and release you run. These sources support the settings or diagnostic behavior used in this fix.
- PaperMC: Basic troubleshooting
- PaperMC: Getting started / Java requirements
- Oracle Java launcher reference
Related fixes and guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.