In my program, I am trying to open a new file for writing.
But while creating the file I am getting the following exception:
IOException:Too many open files.
Contents of the /proc/sys/fs/file-nr while running the program is:
2550 0 736700
Are you closing all the streams your opening when you're done with them? Because the error message is pretty self-explanatory - you have opened and not closed too many files / streams.