unarchiving jar fails

Discussion in 'Java' started by qazmlp, Oct 18, 2004.

  1. qazmlp

    qazmlp Guest

    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:778)

    What is the root-cause of this error? How do I circumvent it?
     
    qazmlp, Oct 18, 2004
    #1
    1. Advertising

  2. qazmlp

    Oscar kind Guest

    qazmlp <> 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
     
    Oscar kind, Oct 18, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Alan Farrell
    Replies:
    6
    Views:
    9,753
    Andrew Thompson
    Jan 9, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    632
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,791
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,869
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    702
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page