-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
b91
-
x86
-
windows_2000
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2141067 | 5.0u15 | Abhijit Saha | P2 | Resolved | Fixed | b02 |
In JDK 1.5.0_06, it is currently not possible
on Windows (x86 & X64) to have more than 2.048 different zip files
concurrently open. The problem doesn't occur on Solaris & Linux
However this is not a windows limitation as a Win32 program which does the same operation using CreateFile doesn't have this problem. Instead this is a limitation built into the C library file handling.
Please find enclosed a sample program (filehandleshortage.java).
you will receive an output similar to the following. The program created and then tries to open 2.100 zip files and read from them (see also the comment in the source file).
Test failed, exception occured. Opened 2036 files
java.util.zip.ZipException: Too many open files
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at FileHandleShortage.doTest(FileHandleShortage.java:52)
at FileHandleShortage.main(FileHandleShortage.java:27)
The Fix for the bug 4189011 seems to resolve this same problem for java.io.File. Similar Fix needs to be done for java.util.zip.ZipFile
on Windows (x86 & X64) to have more than 2.048 different zip files
concurrently open. The problem doesn't occur on Solaris & Linux
However this is not a windows limitation as a Win32 program which does the same operation using CreateFile doesn't have this problem. Instead this is a limitation built into the C library file handling.
Please find enclosed a sample program (filehandleshortage.java).
you will receive an output similar to the following. The program created and then tries to open 2.100 zip files and read from them (see also the comment in the source file).
Test failed, exception occured. Opened 2036 files
java.util.zip.ZipException: Too many open files
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at FileHandleShortage.doTest(FileHandleShortage.java:52)
at FileHandleShortage.main(FileHandleShortage.java:27)
The Fix for the bug 4189011 seems to resolve this same problem for java.io.File. Similar Fix needs to be done for java.util.zip.ZipFile
- backported by
-
JDK-2141067 Java.util.zip doesn't allow more than 2036 zip files to be concurrently open on Windows
- Resolved
- relates to
-
JDK-6374379 ZipFile class cannot open zip files with long filenames
- Resolved
-
JDK-4189011 java.io: Cannot open more than 2035 files (win32)
- Resolved
-
JDK-6474389 test/java/util/zip/ZipFile/ManyZipFiles.java should clean up after itself
- Closed
-
JDK-4519027 Zip file names should support Unicode on NT
- Closed
-
JDK-2141066 ZipFile class cannot open zip files with long filenames
- Resolved
(1 relates to)