Invalid or corrupt jarFile

20,274

I would use a comment for you but I don't have the reputation to comment yet so here goes:

The java version is very possibly an issue. I know that I have had some serious issues very much like what you are explaining because I was using 1.8 (while the project was a 1.6 or 1.7). So using 1.7 instead of 1.8 could definitely be an issue.

I know this doesn't answer your question completely but if possible I would try upgrading your server (probably not an option I know).

Share:
20,274

Related videos on Youtube

Smeiff
Author by

Smeiff

Updated on July 09, 2022

Comments

  • Smeiff
    Smeiff almost 2 years

    This question has been asked various times across this forum but none of these seem to be stemming from the same issue I'm having. So here is my issue...

    I have multiple runnable jar files I use for various projects, these are Selenium projects if that makes more sense. I've not had any issues with any of these jars in the past and I have two servers running all the jars. I am able to run the other jars just fine so can't figure out what the issue is. Only thing that is new is I added some new dependencies in this specific project. On two of my machines this jar works fine. I stored the jar on the network and ran it from these two machines - works fine. Run it from the server machine and I get "Invalid of corrupt jarFile xxx.jar". Since this error is so generic I have no idea what to go on...

    Run the jar by using "java -jar xxx.jar [params]".

    I did notice that the java version on my two machines is 1.8 and the server is 1.7 however the project is built on java 1.7.

    Any idea on this?

  • Smeiff
    Smeiff over 8 years
    I didn't feel like wasting more time troubleshooting this. I just decided to shoot for the upgrade and it worked. I have no idea why this was happening. Shouldn't be the solution but it works for me!