DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32649>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32649 Summary: ant-produced jar files don't match those produced by java.util.jar.JarOutputStream Product: Ant Version: 1.6.2 Platform: PC OS/Version: SunOS Status: NEW Severity: normal Priority: P2 Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] ant seems to produce jar files which are exactly zip files. However, Sun's jar utility seems to produce jar files with a special 0xcafe tag. The Solaris kernel uses this tag to help determine if a jar file should be executable. For example, a jar created using jar(1) can be run: $ chmod a+x hello.jar $ ./hello.jar Hello, World! Whereas the same jar, produced by ant, cannot be. The difference seems to come just after the initial MANIFEST declaration: /usr/bin/jar: 0000000: 504b 0304 1400 0800 0800 7c23 8b31 0000 PK........|#.1.. 0000010: 0000 0000 0000 0000 0000 0900 0400 4d45 ..............ME 0000020: 5441 2d49 4e46 2ffe ca00 0003 0050 4b07 TA-INF/......PK. ^^^^^ 0xcafe ant: 0000000: 504b 0304 0a00 0000 0000 0c25 8b31 0000 PK.........%.1.. 0000010: 0000 0000 0000 0000 0000 0900 0000 4d45 ..............ME 0000020: 5441 2d49 4e46 2f50 4b03 0414 0008 0008 TA-INF/PK....... ^^^^^ 'PK' A frustrating part of this is that Sun's JAR file page doesn't mention this behavior. Since I work for Sun, I'll file a bug on that, and see if I can get the java team to better document this behavior. I also found this page, which might help (see putNextEntry()): http://www.javaresearch.org:88/source/jdk142/java/util/jar/JarOutputStream.java.html -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]