Hi guys, today I tripped on some weird incompatibility between ecj (3.3.1 as found in Debian Lenny) and gjar 0.95: gjar creates jars which need zip version 2.0 to extract, while e.g. fastjar creates files which are readable by version 1.0. This is what 'file' says: src1-fastjar.jar: Zip archive data, at least v1.0 to extract src1-gjar.jar: Zip archive data, at least v2.0 to extract The problem comes when you want to compile something with ecj and put such a jar (the gjar-created one) in the classpath or bootclasspath. It simply does not find the files! ecj -cp ../src1-gjar.jar use/Test.java ---------- 1. ERROR in use/Test.java (at line 3) import base.Base; ^^^^ The import base cannot be resolved ---------- 2. ERROR in use/Test.java (at line 9) Base b = new Base("Test"); ^^^^ Base cannot be resolved to a type ---------- 3. ERROR in use/Test.java (at line 9) Base b = new Base("Test"); ^^^^ Base cannot be resolved to a type ---------- 3 problems (3 errors)rob@linkist:~/tmp/jartest/src2$ Looking at the jar's content reveals that a class is there: gjar -tf src1-gjar.jar META-INF/MANIFEST.MF ./base/Base.class Who is the one to blame? Is ecj unable to process version 2.0 zip files or does gjar create unsuitable files? Is this a known issue? If you do not believe what you see have a look at the attached sources. Create the two jars using the two shell scripts in src1 and then try to compile the class in src2 using the shell scripts within it. Regards Robert
Attachment:
jartest.tar.gz
Description: GNU Zip compressed data
Attachment:
signature.asc
Description: OpenPGP digital signature