Find and send solution urgent


Find and send solution urgent
I have encountered the following exception when I run the
following program using runtime.exec() in solaris. If you have
some idea about it, please let me know.
========= Exception Information ====== Too many open files
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.forkAndExec(Compiled Code)
at java.lang.UNIXProcess.<init>(Compiled Code)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.execInternal(Compiled Code)
at java.lang.Runtime.exec(Compiled Code)
at java.lang.Runtime.exec(Compiled Code)
at java.lang.Runtime.exec(Compiled Code)
at Code)
at TestPro.main(
========= My Program ============
I wrote the program in JSP on UNIX platform using tomcat server.
Runtime.getRuntime.exec("sh "+filename+" "+fileexec);
it is successful execute and create the executefile of the filename(Example : filename.c)
how to execute the fileexec file.
i can use again Runtime.getRuntime.exec("fileexec");
it is give above errors.
please find out solution and send me immediatly.
mail to : [email protected]
It looks like Solaris cannot assign you a new file descriptor since all available descriptors are already in use. We have experienced the same problem under Solaris 7. A possible solution is to adjust the maximum number of open files in the /etc/system configuration file. Search for the following entry (or add it)
* JVM often reports errors about too many open files
set rlim_fd_cur=1024
set rlim_fd_max=4096
I think you will have to reboot the machine after changing the file.
Read More: The other 3 answers