I am using Fedora linux where ulimit -n 10000 increases file limit upto 10000. I want to achieve the same using java program
How to write java program to increase file limit using ulimit I have tried with the below program but it didnot work well. The program didnot give any error. but didnot increase file limit also
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();
}
}
}
Thanks Sunil Kumar Sahoo