Running ant with jdk7
Xueming Shen
Xueming.Shen at Sun.COM
Thu Aug 6 21:12:02 PDT 2009
It appears the failure has nothing to do with the zip code, attached
sample Foo started to fail
( the masking operation & BYTE_3_MASK seems failed) from b65 on
solaris-i586 (but works
fine on sol-sparc, it failed on linux-amd64 as well, have not tried on
other platforms yet). Any
idea where I should send this one to?
Sherman
public class Foo {
private static final long BYTE_3_MASK = 0xFF000000L;
private static final int BYTE_3_SHIFT = 24;
public static void main(String[] args) {
java.util.Random r = new java.util.Random();
byte[] bb = new byte[1];
while(true) {
r.nextBytes(bb);
long l = (bb[0] << BYTE_3_SHIFT) & BYTE_3_MASK;
if (bb[0] < 0)
System.out.printf(" [toLong]: %x -> %x%n",
bb[0] & 0xff, l);
if ((l & 0xf00000000L) != 0) {
System.out.printf("Masking failed!%n");
break;
}
}
}
}
Kelly O'Hair wrote:
>
> Has anyone been running ant with jdk7 or openjdk7? Just curious if
> anyone else
> has run into this problem. My ant script does something like:
>
> <unzip src="${drop.bundle}" dest="${drop.dir}"/>
>
> But when I have ant run with jdk7 (jdk7/bin in my PATH), I'm getting
> this exception:
>
> BUILD FAILED
> java.lang.IllegalArgumentException: invalid entry crc-32
> at java.util.zip.ZipEntry.setCrc(ZipEntry.java:186)
> at
> org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:300)
>
> at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:152)
> at
> org.apache.tools.ant.taskdefs.Expand.expandFile(Expand.java:137)
> at org.apache.tools.ant.taskdefs.Expand.execute(Expand.java:107)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:623)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:357)
> at org.apache.tools.ant.Target.performTasks(Target.java:385)
> at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>
> at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
> at org.apache.tools.ant.Main.runBuild(Main.java:758)
> at org.apache.tools.ant.Main.startAnt(Main.java:217)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
>
>
> Anyone seen that before?
>
> -kto
>
>
More information about the jdk7-dev
mailing list