jar to unpack a file

J

John

Hi there,

From time to time, I receive a updated Jar file and try to unpack it
at the same location by using the normal unpack command:
"
jar -xvf abc.jar
"

But sometimes it fails for the reason that some existing files can not
be over-written. That file is locked somehow. And because of that, the
"unpacking" is failed

My question is: if such thing happens, is there a EASY way that I can
ignore such errors and continue to unpack the rest of files ?


Thanks everyone and happy holidays !




John
 
A

Arne Vajhøj

John said:
From time to time, I receive a updated Jar file and try to unpack it
at the same location by using the normal unpack command:
"
jar -xvf abc.jar
"

But sometimes it fails for the reason that some existing files can not
be over-written. That file is locked somehow. And because of that, the
"unpacking" is failed

My question is: if such thing happens, is there a EASY way that I can
ignore such errors and continue to unpack the rest of files ?

The jar utility is no so advanced. But try with a unzip tool
(a jar file is a zip file).

Arne
 
J

John

Thejarutility is no so advanced. But try with a unzip tool
(ajarfile is a zip file).

Arne

Thank Arne,
I just did what you said, and it works perfectly. Should have thought
about that way.


Thank you and have a good one!



John.
 
R

Roedy Green

My question is: if such thing happens, is there a EASY way that I can
ignore such errors and continue to unpack the rest of files ?

see http://mindprod.com/jgloss/jar.html
http://mindprod.com/jgloss/zip.html

You can unpack it with the jar or zip API. Then you can recover from
errors.

See the code in the Replicator that unpacks zips.

http://mindprod.com/products1.html#REPLICATOR
--
Roedy Green Canadian Mind Products
http://mindprod.com
"Humanity is conducting an unintended, uncontrolled, globally pervasive experiment
whose ultimate consequences could be second only to global nuclear war."
~ Environment Canada (The Canadian equivalent of the EPA on global warming)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top