Using Java-stable020080106-0744 in Windows XP with JDK 1.6.0_04. When I compile the following error is generated: 1 error found:File: C:\Documents and Settings\Administrator\My Documents\Java\Assignment10.java [line: (no source location)]Error: error: error reading C:\Program Files\Java\drjava-stable-20080106-0744.exe; cannot read zip file entry. I have downloaded Dr Java twice and this error remains.
Logged In: YES
user_id=1075744
Originator: NO
We don't know what the cause of this is.
See also: [ 1873498 ] DrJava and Java SE 6
https://sourceforge.net/tracker/?func=detail&atid=438936&aid=1873498&group_id=44253
Logged In: NO
I am using Windows Vista and Java 6 and Dr. Java has always worked fine until Update 4 was released a few days ago. This needs to be fixed ASAP as I cannot compile anything in Dr. Java and makes it useless.
Logged In: NO
I and some of my students have also encountered this problem when using JDK 1.6.0_04. Best I can tell, it did not occur with JDK update 3. Downloading the DrJava executable jar file solves the problem. Is there a problem with update 4 and DrJava's Windows exe? If so, what is it?
Logged In: YES
user_id=728235
Originator: NO
I'm seeing the same thing on windows xp after upgrading from 1.6.0_03 to 1.6.0_04. The exact message I get when trying to compile a "hello world" program is
1 error found:
File: C:\Documents and Settings\perkins\Desktop\Main.java [line: (no source location)]
Error: error: error reading C:\apps\drjava-20080124-1942.exe; cannot read zip file entry
The Java installation seems ok - I can compile and run the same file from the windows command prompt.
Logged In: NO
same error i get
Logged In: YES
user_id=728235
Originator: NO
Followup on this: reverting back to 1.6.0_03 (winxp) with no other changes fixes the problem.
Somebody ought to upgrade this from annoying to fatal/blocking. Can't really use windows drjava if it can't compile programs, alas.
Logged In: YES
user_id=1060117
Originator: NO
Confirmed on a fresh install of Vista with only Java 1.6.0_04 installed. I'm using a recent DrJava build with the new launch4j wrapper.
This is a problem with the way the compiler handles DrJava.exe. Historically, it has been able to recognize DrJava.exe as a wrapped jar file. The system class loader continues to be able to do so (otherwise, the Interactions pane would not work). The bug can be demonstrated without running DrJava.
In Mac OS X:
$ -> javac -version
javac 1.5.0_13
$ -> javac Hello.java (no errors...)
$ -> javac -cp DrJava.exe Hello.java (no errors...)
In Vista:
> javac -version
javac 1.6.0_04
> javac Hello.java (no errors...)
> javac -cp DrJava.exe Hello.java
error: error reading DrJava.exe; cannot read zip file entry
1 error
Same thing with javac 1.6.0_05 in Vista. Using javac 1.6.0_03, I get the same behavior as 1.5.0_13 above.
As a workaround, we could provide a "display all available compilers" option that would list previous compiler updates in the "Compile Output" tab (currently, it only displays one compiler for each major version). That would allow users to compile as long as they had 1.6.0_03 on their systems.
Logged In: YES
user_id=1060117
Originator: NO
Confirmed in the Linux distribution of the JDK as well: bug appears when compiling from the command line with drjava.exe on the class path in 1.6.0_04; no bug in 1.6.0_02.
Logged In: NO
The bug is present in version 1.6.0_05 as well. A friend of mine is having the same issue with the latest version of the Java SDK as of March 30, 2008.
Logged In: YES
user_id=1075744
Originator: NO
Yes, the problem exists in Java 1.6.0 updates 04 and 05, and probably future updates. This is a bug in Java, and Sun needs to fix it. We have filed a bug report and Sun is reviewing the information. The bug report was assigned Review ID 1200070: '"cannot read zip file entry" when exe-wrapped jar is in javac class path'.
===== WORKAROUND -- please read -- WORKAROUND =====
There is a simple workaround: Instead of using the .exe file of DrJava, just use the .jar file. If Java is set up correctly on your system, double-clicking on a .jar file will start the program inside the .jar. If double-clicking does not work, you can go to the command line, change into the directory with the .jar file of DrJava and type:
java -jar drjava.jar
(The name of the .jar file may be different.)
We hope that Sun will fix this bug in their code soon. However, we are also working on an alternative that will remedy this situation even if Sun does not fix their bug.
Logged In: YES
user_id=1060117
Originator: NO
PLEASE DOWNLOAD THE LATEST DEVELOPMENT RELEASE IF YOU ENCOUNTER THIS ERROR.
The latest Development Release has an improved workaround: the exe file is no longer included in the class path during compilation on affected systems. However, this means that JUnit tests will not compile correctly. If you are an affected user (compiling JUnit tests from DrJava.exe with JDK 1.6.0_04 or JDK 1.6.0_05), you will need to download JUnit separately and add it to your class path (in DrJava->Preferences).
Logged In: YES
user_id=1075744
Originator: NO
Fixed as of revision 4567. Will be available in next release.