现在的位置: 首页 > 综合 > 正文

ZipException or IOException on Linux for Java

2013年01月12日 ⁄ 综合 ⁄ 共 588字 ⁄ 字号 评论关闭

ZipException or IOException on Linux for Java

Hu Dennis 2010-07-27

        今天看到下面一段话:

When using a large number of file descriptors to load different instances of classes, you might see an error message "java.util.zip.ZipException: error in opening zip file", or some other form of IOException advising that a file could not be opened. The solution is to increase the provision for file descriptors, using the ulimit command. To find the urrent limit for open files, use the command:

ulimit -a

To allow more open files, use the command:

ulimit -n 8196

让联想到几个月前遇到的一个小问题,当时不知道这个错误是什么原因,或者跟这个有关。当时启动一个基于Java的大型系统,发现系统报ZipException错误。当时觉得很奇怪,后面好像没什么弄,该异常又没有出现了。我想,当时应该就是文件的句柄数不够用了。

 

抱歉!评论已关闭.