Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > unarchiving jar fails

Reply
Thread Tools

unarchiving jar fails

 
 
qazmlp
Guest
Posts: n/a
 
      10-18-2004
Is there any option which disables the automatic creation of
non-existing directories, while unarchiving a .jar file?

Here is what my jar file contains:
user@machine: jar tf myArchive.jar
META-INF/
META-INF/MANIFEST.MF
src/../intf/myModule.class
src/myConstants.class
src/myImpl.class

And, here is what the error message that is reported:
user@machine: jar xvf myArchive.jar
created: META-INF/
inflated: META-INF/MANIFEST.MF
java.io.IOException: src/../intf/ : could not create directory
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.io.IOException.<init>(Compiled Code)
at sun.tools.jar.Main.extractFile(Compiled Code)
at sun.tools.jar.Main.extract(Compiled Code)
at sun.tools.jar.Main.run(Main.java:190)
at sun.tools.jar.Main.main(Main.java:77

What is the root-cause of this error? How do I circumvent it?
 
Reply With Quote
 
 
 
 
Oscar kind
Guest
Posts: n/a
 
      10-18-2004
qazmlp <(E-Mail Removed)> wrote:
> Is there any option which disables the automatic creation of
> non-existing directories, while unarchiving a .jar file?
>
> Here is what my jar file contains:
> user@machine: jar tf myArchive.jar
> META-INF/
> META-INF/MANIFEST.MF
> src/../intf/myModule.class


Ouch! ".." means "parent directory" on most systems.

You may use a zip tool to unzip it. On Linux, the unzip command
distributed with Debian supports a "-j" flag, that ignores any directory
structure while unzipping (and deposits the extracted files in the
extraction directory).

> src/myConstants.class
> src/myImpl.class



--
Oscar Kind http://home.hccnet.nl/okind/
Software Developer for contact information, see website

PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM
Jar file cannot find main class - gfSetup.jar (0/1) James Alan Farrell Java 6 01-09-2004 12:40 PM



Advertisments