File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Mongo DB Applied Patterns
this week in the
or a resume review from
Five Year Itch
Java in General
too many open files - together with ProcessBuilder
Joined: Jan 09, 2010
Jan 24, 2010 02:08:41
I'm going to process a bunch of files (few thousands) and I call external tools for that.
The places where I open a file for reading or writing, I use close in the finally section.
I also use close on the InputReader, I use for getting the output from the called tool.
How can I find out, what breaks my code?
Do I need to call gc or something else?
Are there side-effects of the
, that I did not cared about?
Any hint is appreciated.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Jan 24, 2010 07:01:38
If you are exec()ing the "external tools" then it may be that you are not consuming the stdErr output of the Process.
As I understand it, a stdErr output stream is always created - perhaps that is showing up as an open file?
In any case, carefully read the
Java Resources at
I agree. Here's the link:
subject: too many open files - together with ProcessBuilder
SFTP from java
help using runtime.exec
Calling Perl from Java
Variable number method parameters determined by .ini file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013