IntelliJ Compilation Error zip END header not found

reason: zip end header not found + gradle
fabric loader failed to launch zip end header not found
intellij gradle cache
gradle download
gradle command not found

The Issue

I am unable to compile Java code for an imported Eclipse project on IntelliJ build 182.4505.22 on Java 9 and 10. The following error is displayed when compiling the module, or any individual file:

Error:(1, 1) java: cannot access edu.wit.cs.comp2000

zip END header not found

Details

The structure of the project is as follows:

The full compile-time output is as follows:

Already Attempted

I have reviewed posts here and here, which do not provide any relevant details. I have attempted compiling on both Java 9 and 10, which makes no difference. I have written a main method into LinkedBag and attempted to run that independent of JUnit, which results in the same error. IntelliJ is not correctly displaying the testing icons in my test class, so I suspect that JUnit (or lack of JUnit) is the cause of the issue, however I am unsure how to proceed. Compiling works for other projects (without JUnit tests) just fine.

Updates

  • The code seems to compile and test as expected on Java 1.8 without issue. Switching to Java 9 or 10 causes the above issue every time. I am beginning to suspect that one of my instructor's dependencies requires Java 1.8 specifically, however I would still like to use newer versions of Java if anyone might have a solution.

We had this issue when internet connection dropped while Idea was downloading project dependencies. We solved it by deleting the corrupted file from cache. Cache location depends on your build tool, e. g. for Maven it's in ~/.mvn, for Gradle it's in ~/.gradle.

Cannot build due to "zip END header not found" · Issue #132 · jfrog , Cannot build due to "zip END header not found" #132. Open [ERROR] Re-run Maven using the -X switch to enable full debug logging. Questions: Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this p

As mentioned above, just delete the corrupted cache and restart Intellij.

Running gradle in the commandline can help knowing what you should delete. For instance:

$ ./gradlew --version
Could not unzip /home/cesarc/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb/gradle-5.6.2-all.zip to /home/cesarc/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb.
Reason: error in opening zip file

and after deleting the folder /home/cesarc/.gradle/wrapper/dists/gradle-5.6.2-all/9st6wgf78h16so49nn74lgtbb the problem was solved:

$ ./gradlew --version
Downloading https://services.gradle.org/distributions/gradle-5.6.2-all.zip
......

Downloading gradle-5.4.1-bin.zip occured an Error:Reason: zip , Reason: zip END header not found Exception in thread "main" why do you try to compile jadx yourself instead of using the pre-compiled  Re: java.util.zip.ZipError: zip END header not found jaikiran Mar 7, 2018 6:13 AM ( in response to gquentin ) Please post the complete exception stacktrace and few more details about the nature of operation that gerrit does when you access that URL.

I had a similar issue when I used the dependency thymeleaf-extras-springsecurity4 from org.thymeleaf.extras in a spring boot application.

Updating the dependency to the latest version helped.

Solved - Maven compiling error, I've tried re-installing maven, clearing cache (/.m2/repository/junit/ and the whole folder), a version behind the latest maven (3.6.0 instead of The warning was "zip END header not found". The reason for getting this warning was because I was having a "malformed jar" in my dependencies and thus the compiler was failing during parsing the module-info.java file and was producing the above errors.

Getting Error On Import of Project for Next Challenge, Getting Error On Import of Project for Next Challenge the project i am getting an error on the Gradle build of "Cause: zip END header not found". the new downloaded folder in my Intellij preferences and everything worked. Follow this procedure to repair ZIP file after "expected ZIP file header not found" error: Step 1: First download Remo Repair ZIP application on your desktop / laptop and install it. Run the installed application and follow the main screen procedures.

java.util.zip.ZipError: zip END header not found |JBoss.org Content , Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode). ubuntu 16.04: the deployment works ok but when accessing it on url http://wildflyurl/gerrit i have this error: ZipError: zip END header not found. I am not trying to compile a single class, I am trying to compile a whole project. Please give me a second. Thanks for your quick responses :) – Guus Huizen Aug 12 '16 at 7:45

[JDK-8170276] java.util.zip.ZipException: zip END header not found , ZipException: zip END header not found occurs within webstart application Java HotSpot(TM) 64-Bit Server VM (build 9-ea+142, mixed mode) by webstart causes the exception as shown in the error message below. Zip file header may become corrupted because of a minor mistake of compression tool any kind of header inconsistency could result in error Zip file not found Zip archive data could be damaged due to transfer error while downloading Zip archive from internet.

Comments
  • It also might be a bug in JDK 9/10
  • Probably not a bug. They've started removing things from JDKs newer than 8 that you might be depending on. The solution is to add those dependencies back in your Maven pom.xml.