Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6865530

"cannot read zip file entry" when exe-wrapped jar is in javac class path

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_vista

      Description

      FULL PRODUCT VERSION :
      1.6.0_04 and 1.6.0_05

      ADDITIONAL OS VERSION INFORMATION :
      Windows Vista, Windows XP

      A DESCRIPTION OF THE PROBLEM :
      I work on the development of a Java IDE written in Java (http://sourceforge.net/projects/drjava/). It is distributed as a jar file and, for Windows users, an exe file with an embedded jar. This exe wrapping can be achieved through tools like launch4j (http://sourceforge.net/projects/launch4j/).

      It is essential that compilation driven by the IDE include the drjava.exe file in its class path. In javac 1.6.0_03 and previous, and when invoking "java" in all recent JDK versions, this works just fine. The classes embedded in the exe file are located correctly. With javac 1.6.0_04, the following error occurs:

      error: error reading <filename>.exe; cannot read zip file entry

      DrJava is fairly popular among open-source IDEs (<http://sourceforge.net/softwaremap/trove_list.php?form_cat=65&gt;), and the bug makes compilation from the Windows app impossible, so this is a major roadblock for a lot of users. The best advice we can give them right now is to avoid recent JDK updates.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Download drjava-stable-20080106-0744.exe from http://sourceforge.net/project/showfiles.php?group_id=44253.

      2) Create a simple Hello.java file.

      3) From the Command Prompt:

      > javac -version
      javac 1.6.0_04
      > javac Hello.java
      (no errors)
      > javac -cp drjava-stable-20080106-0744.exe Hello.java
      error: error reading drjava-stable-20080106-0744.exe; cannot read zip file entry
      1 error

      4) Using javac 1.6.0_03:

      > javac -version
      javac 1.6.0
      > javac Hello.java
      (no errors)
      > javac -cp drjava-stable-20080106-0744.exe Hello.java
      (no errors)




      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Should always compile without error. Further, references to the classes in the exe file should be handled without error.
      ACTUAL -
      Unable to compile due to error.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      "cannot read zip file entry"

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      None within the constraints of the problem. Must either abandon the exe wrapper or this version of the compiler.

      Release Regression From : 6u3
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ksrini Kumar Srinivasan
                Reporter:
                ndcosta Nelson Dcosta (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: