ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: How to update a jar?
Date Thu, 10 May 2001 00:02:50 GMT
--- Jon Skeet <> wrote:
> Eek - I didn't realise the jar task just used jar itself. I'd have
> thought it would all be coded up. I'll have to investigate further.

Actually, I'm the one who should have investigated further before I
replied. I keep forgetting I'm in a Java world, even though there are
binaries involved as well :)  The <jar> task doesn't have anything to do
with the 'jar' command (which I'm going to guess was probably written in C
:) It looks like the Jar task extends the Zip task (not the other way
around), and the Zip task uses ZipOutputStream. Whether the one that you'd
get if you're running JDK1.1 would allow you to update an existing jar or
not, I couldn't say -- but I was always under the impression that not
offering an "update" option was a compatibility issue (just managed to
associate that impression with the 'jar' command itself rather than with
the Java classes, since I still don't automatically think in those terms).

As for the <jlink> task, the documentation suggests to me that using the
<addfiles> tag would add files to an existing jar -- I just can't get it
to actually do that.

And as for the original poster of this thread, who wanted to update a
jar-file with a different manifest file -- the <jar> task lets you specify
a manifest file to include instead of the default one, so he shouldn't
really need to go to the <zip> task to do that. (Like I said, I should've
investigated things far better before replying.)



Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

View raw message