增加文件限制我使用Fedora Linux系统,其中的ulimit -n 10000个增加文件限制高达10000我想达到同样的使用java程序如何编写Java程序中使用的ulimit
如何编写Java程序来增加文件限制使用ulimit 我已经尝试过下面的程序,但它没有效果。该程序没有给出任何错误。但因此未增加文件限制也
public class IncreaseFIle {
public static void main(String[] args) {
String command = "/bin/bash ulimit -n 10000";
// String command = "pwd";
try {
Runtime.getRuntime().exec(command);
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
感谢 苏尼尔·库马尔Sahoo
什么是无限循环? – 2010-05-19 13:12:28
下次请使用'101010'按钮正确设置代码。 – 2010-05-19 13:12:44
这不是问题的原因,但你不需要成为根源吗? – 2010-05-19 13:35:11