ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30339] New: - Jar task can create mysteriously broken jar files in 1.5.1, 1.6.2
Date Tue, 27 Jul 2004 02:12:42 GMT
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=30339>.
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=30339

Jar task can create mysteriously broken jar files in 1.5.1, 1.6.2

           Summary: Jar task can create mysteriously broken jar files in
                    1.5.1, 1.6.2
           Product: Ant
           Version: 1.6.2
          Platform: All
        OS/Version: Solaris
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: jonabbey@ganymeta.org


Okay, this one is strange.  I've got an Ant build.xml file that builds a jar
file containing 481 entries, built up from several subdirectories.  If I take
the produced jar file and put it on the web site, Safari on Mac OS X 10.3.4,
Firefox on Fedora Core 2 and Windows 2000, and IE 6 on Windows 2000, against
Java 1.4.1, Java 1.4.2, and Java 1.5.0 beta 2, all refuse to launch the applet
that uses this jar file for its class files and resources.. I get a message
saying that the entry point class can not be found, and I see in my web server
that, after retrieving the jar file, the client JVM tries to load the entry
point class directly.

BUT, if I take the Jar file on my Solaris system, expand it with 'jar xf', then
rejar it with a matching 'jar cf', all of the above platforms find the entry
point class properly in the rejar'ed jar file.  There's something about the Jar
file that Ant is producing in this case that just won't go, even though it
obviously contains everything necessary for proper execution when I take it
through a roundtrip using Sun's jar tool.

When I run both jar files through zipinfo, I see the following differences:

The Ant-produced jar file has file types of 'unx', and the class files are
very much out of order.  A sample zipinfo excerpt is as follows:

-rw-r--r--  2.0 unx     264 b- defN 26-Jul-04 19:25
arlut/csd/ganymede/float_field.class
-rw-r--r--  2.0 unx     618 b- defN 26-Jul-04 19:25
arlut/csd/ganymede/invid_field.class
-rw-r--r--  2.0 unx     290 b- defN 26-Jul-04 19:25
arlut/csd/ganymede/ip_field.class
-rw-r--r--  2.0 unx     262 b- defN 26-Jul-04 19:25
arlut/csd/ganymede/num_field.class
-rw-r--r--  2.0 unx     915 b- defN 26-Jul-04 19:25
arlut/csd/ganymede/pass_field.class
-rw-r--r--  2.0 unx    1160 b- defN 26-Jul-04 19:25
arlut/csd/ganymede/perm_field.class
-rw-r--r--  2.0 unx     636 b- defN 26-Jul-04 19:25
arlut/csd/ganymede/string_field.class
483 files, 1377893 bytes uncompressed, 604275 bytes compressed:  56.1%

With command line jar from Java 1.4.2_05, I see entries like:

-rw----     2.0 fat    1570 bl defN 26-Jul-04 19:29
org/xml/sax/helpers/AttributeListImpl.class
-rw----     2.0 fat     934 bl defN 26-Jul-04 19:29
org/xml/sax/helpers/LocatorImpl.class
-rw----     2.0 fat     893 bl defN 26-Jul-04 19:29
org/xml/sax/helpers/ParserFactory.class
481 files, 1377635 bytes uncompressed, 604097 bytes compressed:  56.1%

I'll include as attachments the good jar file produced by 'jar', the bad
jar file produced by Ant, and the html file used to launch the applet.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message