vServer Linux - Start jar: Invalid or corrupt jarfile

时间秒杀一切 提交于 2019-12-02 11:24:20

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/32299659/vserver-linux-start-jar-invalid-or-corrupt-jarfile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!