Package: gij-3.2 Severity: normal Hi. From what I can tell, zip file handling under gij-3.2 seems to be broken. I have a transcript of a session below that shows a simple Java program involving zip files that breaks under gij-3.2.
This interests me particularly, since Jython currently has a grave bug against it (#180408), and a little investigation seems to trace this problem (jython crashes on startup) back to gij's handling of zip files. Whilst this much simplified example doesn't crash (it merely gives wrong answers), it does clearly show that something is wrong, and I'm hoping that both problems might have the same underlying cause. Anyway, the transcript follows. Thanks - Ben. :) [ Here is a simple program that lists the contents of a zip file. ] [EMAIL PROTECTED]:~> cat Test.java import java.util.zip.*; import java.io.*; public class Test { public static void main(String[] args) { try { // Open the zip file. FileInputStream is = new FileInputStream(args[0]); ZipInputStream zip = new ZipInputStream(is); // Write the name of each entry in the zip file. ZipEntry entry; while ((entry = zip.getNextEntry()) != null) { System.out.println(entry.getName()); zip.closeEntry(); } } catch (Throwable th) { th.printStackTrace(); } } } [ Compile it. ] [EMAIL PROTECTED]:~> gcj-wrapper-3.2 Test.java [ Use it to list the contents of the jar file installed by package libreadline-java (note that jar files are in zip format). ] [ When we run it under gij, it's missing two files. ] [EMAIL PROTECTED]:~> gij-wrapper-3.2 Test /usr/share/java/libreadline-java-0.8.0.jar META-INF/ META-INF/MANIFEST.MF org/ org/gnu/ org/gnu/readline/ org/gnu/readline/ReadlineLibrary.class org/gnu/readline/ReadlineReader.class [ When we run it under the blackdown JRE, all the files show up. ] [EMAIL PROTECTED]:~> java Test /usr/share/java/libreadline-java-0.8.0.jar META-INF/ META-INF/MANIFEST.MF org/ org/gnu/ org/gnu/readline/ org/gnu/readline/ReadlineLibrary.class org/gnu/readline/ReadlineReader.class org/gnu/readline/ReadlineCompleter.class org/gnu/readline/Readline.class [ Let's try extracting the jar and building a zip file ourselves. ] [EMAIL PROTECTED]:~> jar -xf /usr/share/java/libreadline-java-0.8.0.jar [EMAIL PROTECTED]:~> zip -r foo.zip org adding: org/ (stored 0%) adding: org/gnu/ (stored 0%) adding: org/gnu/readline/ (stored 0%) adding: org/gnu/readline/ReadlineLibrary.class (deflated 45%) adding: org/gnu/readline/ReadlineReader.class (deflated 49%) adding: org/gnu/readline/ReadlineCompleter.class (deflated 29%) adding: org/gnu/readline/Readline.class (deflated 57%) [ List the contents of the zip file to make sure we got it right. ] [EMAIL PROTECTED]:~> unzip -l foo.zip Archive: foo.zip Length Date Time Name -------- ---- ---- ---- 0 02-11-03 21:54 org/ 0 02-11-03 21:54 org/gnu/ 0 02-11-03 21:54 org/gnu/readline/ 968 02-11-03 21:54 org/gnu/readline/ReadlineLibrary.class 2851 02-11-03 21:54 org/gnu/readline/ReadlineReader.class 194 02-11-03 21:54 org/gnu/readline/ReadlineCompleter.class 5079 02-11-03 21:54 org/gnu/readline/Readline.class -------- ------- 9092 7 files [ Off we go again; run it under the blackdown JDK and it works. ] [EMAIL PROTECTED]:~> java Test foo.zip org/ org/gnu/ org/gnu/readline/ org/gnu/readline/ReadlineLibrary.class org/gnu/readline/ReadlineReader.class org/gnu/readline/ReadlineCompleter.class org/gnu/readline/Readline.class [ Run it under gij and it's still missing two files. ] [EMAIL PROTECTED]:~> gij-wrapper-3.2 Test foo.zip org/ org/gnu/ org/gnu/readline/ org/gnu/readline/ReadlineLibrary.class org/gnu/readline/ReadlineReader.class [ That should do for now. ] [EMAIL PROTECTED]:~>