PDA

View Full Version : jar -u option unimplemented



normanfung
10th October 2004, 07:59 AM
I was trying to update a EAR (jar) file:

[root@localhost somefolder]# ls
bugs packaging-build.xml StockEJB.jar xdoclet-build.xml
index.jsp pages StockWeb.war
merge Stock.ear
META-INF StockEJB-client.jar WEB-INF
[root@localhost somefolder]# jar -uf Stock.ear StockEJB.jar
jar: `-u' mode unimplemented.

What does it mean by "-u mode unimplemented"? Where can I get a jar tool that supports -u option? btw, it's a Fedora box.

Thanks!

fjleal
10th October 2004, 10:47 AM
Try "jar --help" for a list of options. But jar is a Java 2 SDK took, it is not related to FC2. If you need to upgrade the j2sdk, try visiting http://java.sun.com. JDk 5.0 (Tiger) is now available.

crackers
10th October 2004, 05:43 PM
None of the command-line JAR tools that I've used support the update option. Why this is, I don't know. You're safer off recreating the EAR file anyway, from the command-line. I strongly advocate the usage of ANT, which does allow you to update JAR-based files. (Go figure).

fjleal
10th October 2004, 10:46 PM
None of the command-line JAR tools that I've used support the update option.
Don't they? That's weird, because j2sdk reports:


Usage: jar {ctxuV}[vfm0ME@] [jar-file] [manifest-file] [-C dir] files
(...)
-u update existing archive
(...)

I didn't try, but the option is there in the help text.

crackers
11th October 2004, 12:15 AM
It's been there for a long time - it just don't work. And the manifest files have been "broken" for at least four years (allow multiple Class-Path lines). I'm guessing not enough people have *****ed about these "minor" annoyances to raise the visibility of them.