[SOLVED] howto unzip multipart zipfiles?

Hi all, I have a problem that is driving me crazy, I downloaded some app I need and its a multipart zip file, In windows I should just unzip the file regularly and all went good, whoever the unzip linux utility refuses to do so.
I do have a virtual machine and can just uncompress the file there, but why linux doesn't want to unzip the file?
I tried the instructions provided here http://www.hendra-k.net/how-to-extract- … files.html to no avail, the -F option doesnt work (even if I inputthe --out operand and specify and different zip file, it doesn't work also with -FF option.
Any help will be appreciated.
thanks in advance
Last edited by 655321 (2010-09-24 21:00:21)

Ashren wrote:
Just a crazy idea ... Try joining them like this:
cat *.z* > newfile.zip
And then unzip the resulting file.
It probably won't work.
That's what he's trying to do, as the linked article suggested:
hendra-k@server $ cat zipfiles.* > zipfiles-full.zip
hendra-k@server $ zip -F zipfiles-full.zip
hendra-k@server $ unzip zipfiles-full.zip

Similar Messages

  • [Solved] Howto boot Windows 7 from grub2 and uefi?

    I have added the following entry in my grub.cfg file..:
    menuentry "Windows 7" {
    insmod part_gpt
    insmod fat
    search --file --no-floppy --set=root /efi/Microsoft/Boot/bootmgfw.efi
    chainloader ()/efi/Microsoft/Boot/bootmgfw.efi
    But if I choose this entry, I get an error telling me "No such disk"
    What am I missing?
    Regards,
    BTJ
    Last edited by bjorntj (2011-09-13 08:41:42)

    bjorntj wrote:
    Thx...
    BTJ
    Mark the thread as [SOLVED].
    Last edited by skodabenz (2011-09-13 08:39:14)

  • [SOLVED] HOWTO disable tmpfs on /tmp?

    I want to disable tmpfs on /tmp, so I commented-out the relevant line in fstab. Nevertheless something mounted tmpfs on /tmp (systemd?). How to find that something?
    Last edited by BenoitSvB (2012-09-06 10:06:15)

    qbittorrent is actually really good except for this one bug. The alternatives (deluge, rtorrent) suck more.
    BTW: Solved the problem like this:
    $ cat /etc/tmpfiles.d/tmp.conf
    # This file is part of systemd.
    # systemd is free software; you can redistribute it and/or modify it
    # under the terms of the GNU Lesser General Public License as published by
    # the Free Software Foundation; either version 2.1 of the License, or
    # (at your option) any later version.
    # See tmpfiles.d(5) for details
    # Clear tmp directories separately, to make them easier to override
    D /tmp 1777 root root 0
    D /var/tmp 1777 root root 10d
    # Exclude namespace mountpoints created with PrivateTmp=yes
    x /tmp/systemd-private-*
    x /var/tmp/systemd-private-*
    X /tmp/systemd-private-*/tmp
    X /var/tmp/systemd-private-*/tmp
    Thanks, WonderWoofy
    Last edited by akurei (2013-12-02 14:43:26)

  • [Solved]Howto per user xorg.conf

    Hi,
    maybe I should read more about X configurations, but sometime we can find a timely answer on the forum
    Sorry but my knowledge lacks a bit on this matter
    I'm planning to introduce my wife on linux world , but she likes winXP, Then I found the answer in virtualbox
    Now she complain that I set the screen resolution too high for her. In fact X starts with the given resolution by xorg.conf found into /etc/X11 made by nvidia-settings.
    How to modify resolution as an user logs in?
    Is there a way to load either different xorg.conf or to tell HAL to talk to X to change configuration like nvidia-settings can do on-the-fly?
    I'd like to show to my wife an invisible linux
    F
    Last edited by TheSaint (2009-10-08 17:26:58)

    Well, I don't know how to do it through ~/.Xdefaults, but I would assume that editing ~/.bash_profile or ~/.bashrc or even ~/.xinitrc would due by adding in `xrandr -s <preferred resolution here>'. That way each time a user logs in, it would execute that and change the resolution to whatever user. Sounds slightly hackish though so I am gonna look at how to do it through /etc/X11/xorg.conf and ~/.Xdefaults, however, I doubt it can be done through /etc/X11/xorg.conf also. If I find anything, I shall return to you.

  • [Solved] Howto find a package name knowing a filename

    Hi everyone.
    Let's suppose I need a file /usr/sbin/ip
    What must be a pacman command so that I could find a package name which
    involves this file? pacman -S..
    Last edited by polymetr (2010-06-03 18:15:37)

    pacman -Qo /usr/sbin/ip
    nevermind thought you already had it installed, wonder is right.
    Last edited by droog (2010-06-03 16:58:25)

  • [SOLVED] Howto right-align af:InputListOfValues

    Hi,
    JDEV 11g, TP4.
    I'm not able to right align the content of the af:inputListOfValues.
    I have tried styleclass, skinning and inline-style with no success.
    inlineStyle="text-align:right;">
    Is this a bug or my mistake ?
    regards
    Peter
    Message was edited by:
    hofespet

    Hi,
    inlineStyle only works on the root DOM object. If a component is complex then the CSS might not be applied to the textfield but some surrounding fragment. In this case you would need to use skinning
    Frank

  • Unzipping  zipfile with sub folders...using zlib java

    Hello,
    I am encounterig a problem while unzipping a zipfile using zlib.The zip file contaings subdirectories.so i am not able to unzip the zipfile.Since my code is able to unzip only the files which are in current directory.Please help me out to unzip the subdirectories using zlib.
    Please find my below code..for unzip the files in current directory..
    String destinationname = rootFolder.getAbsolutePath();
    byte[] buf = new byte[1024];
    ZipInputStream zipinputstream = null;
    ZipEntry zipentry;
    zipinputstream = new ZipInputStream(
    new FileInputStream(destinationname+"\\"+date+".zip"));
    zipentry = zipinputstream.getNextEntry();
    while (zipentry != null)
    //for each entry to be extracted
    String entryName = zipentry.getName();
         LoggerHtml.debug(entryName);
         int n;
         FileOutputStream fileoutputstream;
         File newFile = new File(entryName);
         String directory = newFile.getParent();
         if(directory == null)
         //break;
         fileoutputstream = new FileOutputStream(
         entryName);
         while ((n = zipinputstream.read(buf, 0, 1024)) > -1)
         fileoutputstream.write(buf, 0, n);
         fileoutputstream.close();
         zipinputstream.closeEntry();
         zipentry = zipinputstream.getNextEntry();
    Please provide me the coding..It is very urgent...

    google
    code #1
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    public class unzip
        public static void main(String args[])
            if(args.length < 1)
                System.out.println("Syntax : unzip zip-file destination-dir[optional]");
                return;
            try
                ZipFile zf = new ZipFile(args[0]);
                Enumeration zipEnum = zf.entries();
                String dir = new String(".");
                if( args.length == 2 )
                    dir = args[1].replace('\\', '/');
                if(dir.charAt(dir.length()-1) != '/')
                    dir += "/";
                while( zipEnum.hasMoreElements() )
                    ZipEntry item = (ZipEntry) zipEnum.nextElement();
                    if( item.isDirectory() ) //Directory
                        File newdir = new File( dir + item.getName() );
                        System.out.print("Creating directory "+newdir+"..");
                        newdir.mkdir();
                        System.out.println("Done!");
                    else //File
                        String newfile = dir + item.getName();
                        System.out.print("Writing "+newfile+"..");
                        InputStream is = zf.getInputStream(item);
                        FileOutputStream fos = new FileOutputStream(newfile);
                        int ch;
                        while( (ch = is.read()) != -1 )
                            fos.write(ch);
                        is.close();
                        fos.close();
                        System.out.println("Done!");
                zf.close();  
            catch(Exception e)
                System.err.println(e);
    }code #2
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Enumeration;
    import java.util.SortedSet;
    import java.util.TreeSet;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    * UnZip -- print or unzip a JAR or PKZIP file using java.util.zip. Command-line
    * version: extracts files.
    * @author Ian Darwin, [email protected] $Id: UnZip.java,v 1.7 2004/03/07
    *         17:40:35 ian Exp $
    public class UnZip {
      /** Constants for mode listing or mode extracting. */
      public static final int LIST = 0, EXTRACT = 1;
      /** Whether we are extracting or just printing TOC */
      protected int mode = LIST;
      /** The ZipFile that is used to read an archive */
      protected ZipFile zippy;
      /** The buffer for reading/writing the ZipFile data */
      protected byte[] b;
       * Simple main program, construct an UnZipper, process each .ZIP file from
       * argv[] through that object.
      public static void main(String[] argv) {
        UnZip u = new UnZip();
        for (int i = 0; i < argv.length; i++) {
          if ("-x".equals(argv)) {
    u.setMode(EXTRACT);
    continue;
    String candidate = argv[i];
    // System.err.println("Trying path " + candidate);
    if (candidate.endsWith(".zip") || candidate.endsWith(".jar"))
    u.unZip(candidate);
    else
    System.err.println("Not a zip file? " + candidate);
    System.err.println("All done!");
    /** Construct an UnZip object. Just allocate the buffer */
    UnZip() {
    b = new byte[8092];
    /** Set the Mode (list, extract). */
    protected void setMode(int m) {
    if (m == LIST || m == EXTRACT)
    mode = m;
    /** Cache of paths we've mkdir()ed. */
    protected SortedSet dirsMade;
    /** For a given Zip file, process each entry. */
    public void unZip(String fileName) {
    dirsMade = new TreeSet();
    try {
    zippy = new ZipFile(fileName);
    Enumeration all = zippy.entries();
    while (all.hasMoreElements()) {
    getFile((ZipEntry) all.nextElement());
    } catch (IOException err) {
    System.err.println("IO Error: " + err);
    return;
    protected boolean warnedMkDir = false;
    * Process one file from the zip, given its name. Either print the name, or
    * create the file on disk.
    protected void getFile(ZipEntry e) throws IOException {
    String zipName = e.getName();
    switch (mode) {
    case EXTRACT:
    if (zipName.startsWith("/")) {
    if (!warnedMkDir)
    System.out.println("Ignoring absolute paths");
    warnedMkDir = true;
    zipName = zipName.substring(1);
    // if a directory, just return. We mkdir for every file,
    // since some widely-used Zip creators don't put out
    // any directory entries, or put them in the wrong place.
    if (zipName.endsWith("/")) {
    return;
    // Else must be a file; open the file for output
    // Get the directory part.
    int ix = zipName.lastIndexOf('/');
    if (ix > 0) {
    String dirName = zipName.substring(0, ix);
    if (!dirsMade.contains(dirName)) {
    File d = new File(dirName);
    // If it already exists as a dir, don't do anything
    if (!(d.exists() && d.isDirectory())) {
    // Try to create the directory, warn if it fails
    System.out.println("Creating Directory: " + dirName);
    if (!d.mkdirs()) {
    System.err.println("Warning: unable to mkdir "
    + dirName);
    dirsMade.add(dirName);
    System.err.println("Creating " + zipName);
    FileOutputStream os = new FileOutputStream(zipName);
    InputStream is = zippy.getInputStream(e);
    int n = 0;
    while ((n = is.read(b)) > 0)
    os.write(b, 0, n);
    is.close();
    os.close();
    break;
    case LIST:
    // Not extracting, just list
    if (e.isDirectory()) {
    System.out.println("Directory " + zipName);
    } else {
    System.out.println("File " + zipName);
    break;
    default:
    throw new IllegalStateException("mode value (" + mode + ") bad");
    hth

  • Using unzip from unix in java-code ...

    Hi people,
    i have problem, i want to use the command unzip from unix, to unzip a zip-file, the commend unzip must invoke from java-code. Can someone help me. I use the zip-api, but i have 100Mb zip-file, it needs very long time to unzip the zip-file.
    thanks for your help ...

    ok, not sure how much improvement this will give in general, but its given a reliable 25% speed increase on my mini tests
    using the nio libraries will also get you a lot further, and is the way to go if you are very keen on speed
    asjf
    import java.awt.*;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import javax.swing.*;
    public class Unzipper {
         private Unzipper() {}
         private static byte[] buffer = new byte[16384];
         public static void unzip(File file, Component parentComponent,     File outputDir) throws ZipException, IOException {
              unzip(new ZipFile(file), parentComponent, outputDir);
         public static void unzip(File file, int mode, Component parentComponent, File outputDir) throws IOException {
              unzip(new ZipFile(file, mode), parentComponent, outputDir);
         public static void unzip(String name, Component parentComponent, File outputDir)     throws IOException {
              unzip(new ZipFile(name), parentComponent, outputDir);
         public static void unzip(ZipFile zip, Component parentComponent, File outputDir)     throws IOException {
              if ( zip == null) {
                   throw new NullPointerException("outputDir is null");
              int size = zip.size();
              if (size > 0) {
                   if (outputDir == null) {
                        throw new NullPointerException("outputDir is null");
                   if (!outputDir.exists()) {
                        outputDir.mkdirs();
                   ProgressMonitor monitor =
                   new ProgressMonitor(parentComponent,
                   "Unpacking " + zip.getName() + "...", "", 0, size);
                   monitor.setMillisToDecideToPopup(0);
                   monitor.setMillisToPopup(0);
                   Enumeration entries = zip.entries();
                   for ( int i = 0; entries.hasMoreElements(); ) {
                        ZipEntry entry = (ZipEntry) entries.nextElement();
                        /*if (entry.getMethod() == ZipEntry.DEFLATED)
                        System.out.println(" Inflating: "+entry.getName());
                        else
                        System.out.println(" Extracting: "+entry.getName());*/
                        monitor.setNote(entry.getName());
                        File File = new File(outputDir, entry.getName());
                        File.getParentFile().mkdirs();
                        if (!entry.isDirectory()) {
                             InputStream in = null;
                             OutputStream out = null;
                             try {
                                  in = zip.getInputStream(entry);
                                  out = new FileOutputStream(File);
                                  for (int n = 0; (n = in.read(buffer)) > -1; )
                                       out.write(buffer, 0, n);
                                  monitor.setProgress(++i);
                             } finally {
                                  if (out != null) {
                                       try {
                                            out.close();
                                       } catch (IOException e) {
         public static void main(String[] args) throws ZipException, IOException
              if (args.length !=2) {
                   System.err.println("Usage: java Unzipper <zip file> <output dir>");
                   System.exit(1);
              long start = -System.currentTimeMillis();
              unzip(args[0], null, new File(args[1]));
              System.out.println(start+System.currentTimeMillis());
              System.exit(0);

  • Unzip issue

    Hi,
    The code is as follows
    public class TestUnzip {
         final static int BUFFER = 2048;
         public static void unzip(String zipFile) {
              try {
         BufferedOutputStream dest = null;
         BufferedInputStream is = null;
         ZipEntry entry;
         ZipFile zipfile = new ZipFile(zipFile);
         Enumeration e = zipfile.entries();
         while(e.hasMoreElements()) {
         entry = (ZipEntry) e.nextElement();
         System.out.println("Extracting: " +entry);
         is = new BufferedInputStream
         (zipfile.getInputStream(entry));
         int count;
         byte data[] = new byte[BUFFER];
         FileOutputStream fos = new
         FileOutputStream(entry.getName()); Exception occured here
         dest = new
         BufferedOutputStream(fos, BUFFER);
         while ((count = is.read(data, 0, BUFFER))
         != -1) {
         dest.write(data, 0, count);
         dest.flush();
         dest.close();
         is.close();
         } catch(Exception e) {
         e.printStackTrace();
    The exception Stack Trace
    Extracting: js/partner_s.js
    java.io.FileNotFoundException: js\partner_s.js (The system cannot find the path specified)
         at java.io.FileOutputStream.open(Native Method)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
         at TestUnzip.unzip(TestUnzip.java:32)
         at Test.main(Test.java:21)
    If we have a close look . it is extracting js/partner_s.js and creating an outputstream for js\partner_s.js . how do i handle this escape sequence issue
    please help
    Cheers
    n4v33n
    Edited by: n4v33n on Dec 8, 2008 7:53 AM

    Thanks a lot for the suggestion bro. that took me a step further,
    To end up with this
    Extracting: js/partner_s.js
    Extracting: js/
    java.io.FileNotFoundException: C:\Documents and Settings\naveenm\Desktop\DumMaaroDum\js (Access is denied)
         at java.io.FileOutputStream.open(Native Method)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
         at TestUnzip.unzip(TestUnzip.java:34)
         at Test.main(Test.java:22)
    The folder js and the file were written and this exception was thrown.
    Cheers
    n4v33n

  • Problem connecting to salesforce with crystal reports

    I have downloaded the java Java SE Development Kit 6u7 (First Customer Ship) and then downloaded crystal reports. Every time I try to connect to saleforce via CR it takes about 10 minutes and then I get this error message: invalid argument provided, java server startup failure, verify the path (jdk), classpath,and IORfilelocation in the crconfig.xml file, In addition verify you are using JDK 1.5
    What can I do to solve this problem? Please help me! Thank you

    Fahad,
    I do not think you need to reinstall the CR application, but I would suggest to apply the following knowledgebase article steps. Couple of comments: 1. you do not have to delete CRConfig.xml on the second step - just rename it to CRConfig.old   2. You do not have to download new driver - you already have one, just reinstall it.
    1197347 - Error: "Invalid Argument provided. Details: Java Server startup failure.."
    when connecting to Salesforce.com from Crystal Reports XI
    Symptom
    When attempting to connect to a valid Salesforce.com professional account from Crystal Reports XI, the following error message appears:
    "Invalid Argument provided. Details: Java Server startup failure. Please verify the PATH (JDK), CLASSPATH and IORFileLocation properties in the CRConfig.xml file. In addition, please verify you are using JDK 1.4."
    Cause
    The error message is caused by an older version of the Crystal Reports Salesforce.com driver not connecting with professional accounts. Other error messages may include "Failed to establish a connection."
    Resolution
    To resolve this issue, follow these steps:
    Close Crystal Reports.
    Verify that you have at least version 1.4 of the Java Runtime Environment (JRE) by opening Internet Explorer and clicking on Tools > Sun Java Console. If the Java Console Message says "Java Plug-in 1.4.0_00. Using JRE version 1.4.0_00 Java HotSpot(TM) Client VM" or higher you are using the correct version of the JRE. 
    Go to the appropriate directory for your version of CRXI and back up the CRConfig.xml file, then delete it.
    If you are using CRXI R1, the directory will be C:\Program Files\Common Files\Business Objects\3.0\Java, and if you are using CRXI R2 the directory will be C:\Program Files\Business Objects\Common\3.5\Java.
    Reopen Crystal Reports; CR will recreate the CRConfig.xml file when you reopen the program. When the "Installing" message box disappears, close CR.
    Search for sfdc.msi on your computer. This is the installation file for the Salesforce.com driver. When you double-click this installation file, you will be asked whether you want to repair or uninstall the Salesforce.com driver. Uninstall the driver. Delete all existing sfdc.zip files or unzipped sfdc files and directories including the sfdc.msi file you just executed.
    Download the latest version of the Crystal Reports Salesforce.com driver, available from http://ftp1.businessobjects.com/outgoing/sales/sfdc_driver.zip. Unzip the zipfile to a convenient temporary location that you will be able to find; for example, your desktop.
    Run the new sfdc.msi installation file; the installation file will install the latest version of the Salesforce.com drivers.
    You should now be able to connect with Salesforce.com from CRXI using a valid username and password.
    Edited by: Vitaly Izmaylov on Aug 21, 2008 11:49 AM
    Edited by: Vitaly Izmaylov on Aug 21, 2008 11:50 AM

  • Errors while copying File Oracle 11G installation on AIX 5L

    Hi,
    I just try to install oralce 11g on my AIX 5l machine. All requirements has been checked and are done.
    While installation I get many Errors like "File not find:"
    /oracle/SID/..../applications/WFMLRSVCApp.ear , wfjvlsnr.csh, wfmgrstop.csh ..etc.
    I am Installing fresh Oracle 11G.What could be the problem?
    Could you please give me some hints.
    Many Thanks
    Mete

    Make sure you unzip both zipfiles into the SAME directory, e.g.:
    cd /<whatever>
    $ unzip aix.ppc64_11gR1_database_1of2.zip
    $ unzip aix.ppc64_11gR1_database_2of2.zip
    $ cd database
    $ ./runInstaller
    Werner

  • Cannot use some vm templates in ovm 3.0

    hi all,
    not sure I like the way I have to place the vm templates on a URL server in 3.0 but I'll play ball..
    some of the small templates are working for me but the larger and multifile templates are failing - the current one is grid_control (32bit but only one anyway)
    I place the URL for each tgz on a separate line as instructed but the failure given is :
    >>>
    Async operation failed on server: ovmdl580.
    Object: cfgFile_0004fb000014000055e2078ee4a4cdf0,
    PID: 24373,
    Server error message: Template import error: Command: (tar xzf /OVS/Repositories/0004fb000003000060c477cf3f42070f/Templates/0004fb000014000055e2078ee4a4cdf0/tmp/OVM_EM_111_1of4.tgz --no-same-owner -C /OVS/Repositories/0004fb000003000060c477cf3f42070f/Templates/0004fb000014000055e2078ee4a4cdf0/tmp) failed: (2)
    " on server "35:38:38:38:35:37:47:42:38:31:31:36:4a:34:50:58" associated with object "cfgFile_0004fb000014000055e2078ee4a4cdf0"
    <<<
    any ideas?

    Thanks again Avi,
    Is there a slight doc bug in the manager - it says "to import a multifile template, enter each template component URL on a new line" as hovertext in the import URL box
    when really the process is:
    1) download the zipfiles
    2) unzip the zipfiles (this gives the multi files referred to above, but they are not actually useful)
    3) uncompress & concatenate the tgz splices into untar to create the full directory structure
    4) create a single tgz (tar, gzip) file from the structure
    5) host this on a URL server
    6) import into server using the manager
    whilst this is still 'super easy' (Wim's words not mine) it is harder than it was at 2.2 - am I missing something in the managers invitation to enter each component on a single line or is that a bug in the hovertext?
    As always thanks

  • Sending novell command from PHP

    Hi,
    I am trying to unzip a file from php.
    I am trying to run a unzip command from phpm but the novell server won't take it.
    when i do: <?php exec("unzip DATA1:/zipfile.zip"); ?>
    i get: unable to find load file SYS:/TMP/UNZIP
    when i do: <?php exec("echo unzip DATA1:/zipfile.zip"); ?>
    i get: unable to find load file SYS:/TMP/ECHO
    when i do: <?php exec("echo unzip "); ?>
    i get: unzip.nlm load status KenelOnly
    Does someone know how to send a command from php to Novell correctly??
    Thank you,

    Have you tried specifying the path with something like
    <?php exec("sys:/system/unzip DATA1:/zipfile.zip"); ?>
    Wolfgang
    "Flex Travel - Higo Rocha Cidario" <[email protected]> wrote in message
    news:oE0uh.7409$[email protected]..
    > Hi,
    >
    > I am trying to unzip a file from php.
    > I am trying to run a unzip command from phpm but the novell server won't
    > take it.
    >
    > when i do: <?php exec("unzip DATA1:/zipfile.zip"); ?>
    > i get: unable to find load file SYS:/TMP/UNZIP
    >
    > when i do: <?php exec("echo unzip DATA1:/zipfile.zip"); ?>
    > i get: unable to find load file SYS:/TMP/ECHO
    >
    > when i do: <?php exec("echo unzip "); ?>
    > i get: unzip.nlm load status KenelOnly
    >
    > Does someone know how to send a command from php to Novell correctly??
    >
    > Thank you,
    >

  • Convert gzip files into XML format

    We have a requirement where we receive gzip files. These files are zipped file containing base64 binary format csv files. We would have to convert these files into XML format. Please let me know any of the following.
    1. Is there any Xpath query or XSL function (somthing similar like doTranslateFromNative() ) to convert from gzip files to XML format.
    2. If we need to unzip the zipfile outside fusion, then java code piece to unzip the gzip file. I guess after that we can use the usual doTranslateFromNative() function to translate to XML format, since after unzipping the gzip file, they are base64 binary formats.
    Thanks in advance,
    Toms

    There is an option to do pre-processing and post processing of Files when using File adapter. You need to create a valve which will first do pre processing and send the output to FileAdapter.
    You can get more information here:
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#CACDHGGG
    under section: 4.2.14 Pre-Processing and Post-Processing of Files
    Essentially you will use Java to unzip the file first and then the unzipped content will be passed to the adapter.

  • ZipException : error in opening zip file

    Hello,
    I need to create a zip file using Java. I have to zip content from a directory (sub-folders included). So I'm using a recursive method.
    In fact my zip file is well created, when I open it with winrar, winzip, everything is ok, same thing with a bash on linux (unzip).
    My problem is that I have to open the created zip file in Java. When I do it, i get an exception:
    java.util.zip.ZipException: error in opening zip file
            at java.util.zip.ZipFile.open(Native Method)
            at java.util.zip.ZipFile.<init>(ZipFile.java:203)
            at java.util.zip.ZipFile.<init>(ZipFile.java:234)
            ...This is my method:
    public void zipContent()
           ZipOutputStream zipout;
            try
                zipout = new ZipOutputStream("destination zip file");
                zipDir("main source directory", zipout, "");
                zipout.close();
            catch (FileNotFoundException e)
                e.printStackTrace();
            catch (IOException e)
                e.printStackTrace();
        private void zipDir(String source, ZipOutputStream zipout, String relativeDir) throws IOException
            File zipDir = new File(source);
            String[] dirList = zipDir.list();
            byte[] readBuffer = new byte[2156];
            int bytesIn = 0;
            // Loop through dirList, and zip the files.
            for (int i = 0; i < dirList.length; i++)
                File f = new File(zipDir, dirList);
    if (f.isDirectory())
    // If the File object is a directory, call this
    // function again to add its content recursively.
    String filePath = f.getPath();
    String name = f.getName();
    if (!name.endsWith("/")) name += "/";
    zipEntries.put(name, name);
    if (relativeDir.equals(""))
    ZipEntry anEntry;
    anEntry = new ZipEntry(name);
    zipout.putNextEntry(anEntry);
    zipout.closeEntry();
    zipDir(filePath, zipout, name);
    else
    ZipEntry anEntry;
    if (!relativeDir.endsWith("/"))
    relativeDir += "/";
    anEntry = new ZipEntry(relativeDir + name);
    zipout.putNextEntry(anEntry);
    zipDir(filePath, zipout, relativeDir + name);
    // Loop again.s
    continue;
    // Create a FileInputStream on top of f.
    FileInputStream fis = new FileInputStream(f);
    ZipEntry anEntry;
    if ((!relativeDir.endsWith("/")) && (!relativeDir.equals("")))
    relativeDir += "/";
    if (!relativeDir.equals(""))
    anEntry = new ZipEntry(relativeDir + f.getName());
    else
    anEntry = new ZipEntry(f.getName());
    // Place the zip entry in the ZipOutputStream object.
    zipout.putNextEntry(anEntry);
    zipEntries.put(anEntry.getName(), anEntry.getName());
    // Now write the content of the file to the ZipOutputStream.
    while ((bytesIn = fis.read(readBuffer)) != -1)
    zipout.write(readBuffer, 0, bytesIn);
    // Close the Stream.
    zipout.closeEntry();
    fis.close();
    This the code I use to unzip:
            try
                ZipFile zip = new ZipFile(zipFile);
                Enumeration zipEnum = zip.entries();
                zipEnum = zip.entries();
                while (zipEnum.hasMoreElements())
                    ZipEntry item = (ZipEntry) zipEnum.nextElement();
                    // Directory case.
                    if (item.isDirectory())
                        File newdir = new File(unzippedFilesDir + "/" + item.getName());
                        newdir.mkdir();
                    // File case.
                    else
                        String newfile = unzippedFilesDir + "/" + item.getName();
                        InputStream is = zip.getInputStream(item);
                        FileOutputStream fos = new FileOutputStream(newfile);
                        int ch;
                        while ((ch = is.read()) != -1)
                            fos.write(ch);
                        is.close();
                        fos.close();
                zip.close();
            catch (Exception e)
                System.out.println(e);
                e.printStackTrace();
            }The exception is thrown on the line:
    ZipFile zip = new ZipFile(zipFile);Do you see something weird in my code..?
    I'm working on this problem for several days, and I'm losing hope...
    Thanks,
    Phil

    This looks wierd:
    ZipFile zip = new ZipFile(zipFile);
    Enumeration zipEnum = zip.entries();
    zipEnum = zip.entries();

Maybe you are looking for

  • Illegible concersions from PDF to Word

    My pdfs recently converted to docx format in Word for Mac (runing Yosemite)  are in unreadable characters. Does anyone have an idea of how to reproduce these files so they can be cut and pasted? Otherwise this $23 a year is going to be a big waste. T

  • Auto-discovery option..

    In Weblogic we need to define the managed server in the administration server first for it to be a part of the cluster. Which means that if the administration server is not available for any reason the configuration of the cluster cannot be altered.

  • Users list based on attributes

    SRM Gurus, Is there a way to extract a list of users in SRM that match certain attributes, such as their backend system, document type, company code? Does anyone know which tables I can use to get such data? Thanks. SN

  • Which network cards works with Solaris 8?

    Hi, I am installing Solaris 8 on a PC but I am having a problem finding a network card that the system will recognise. I have tried HP and Intel cards but always see the error message "iprb: iline value out of range: 255" Is there a particular brand/

  • ITunes Update: Cannot Locate iTunes.msi

    I am currently attempting to update my iTunes to the most recent version (I believe it is 10.5.11). However, I am currently stuck due to a popup during the installation process which states that I need to locate the "iTunes.msi" file. If I press canc