2

I'm running a Linux vServer with Debian 8.0 64 bit with 512 MB RAM and 150GB space.

Its planned to use it for a game and let a Server.jar run nonstop. The Server is working with Kryonet, a library for simple Client/Server communication. On my server i installed Java 1.8 and its working fine, for testing i downloaded Minecraft server jar, it works perfectly. So i packed my Server into a executable jar with eclipse (compile version 1.8), it worked fine when starting it with cmd on my computer (Java 8 installed) but when trying to start it on the server: Error: Invalid or corrupt jarfile Server.jar

I thought it could be a problem with the librarys i used, so i tried a clean HelloWorld jar, also does not work.

Here is a screenshot showing my installed java version and trying to run my HelloWorld jar. enter image description here

1 Answer 1

5

I solved the problem!

The jar really was corrupted: I transfered the jar on my server by using mediafire as hoster and using the direct download link to download the jar on to the server via wget <url>.

Seemingly mediafire was damaging the jars (maybe by compressing them), so i used Dropbox as hoster and everything worked fine!

I hope i can help someone having the same problem.

2
  • 2
    I stucked into same problem. I sent with FTP via binary mode. Your case was so helpful, Thank you.
    – Minkyu Kim
    Commented Apr 8, 2016 at 2:45
  • This happened for me too, using wget. Commented Jan 7, 2023 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.