|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
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
|