title: Java program terminates unexpectedly without any error message
body: <p>I have written a java program which needs to process thousands of text files (all needs to be loaded on memory). It works fine with as many as 123 input files, but when I run it to process around 5000 files, it terminates unexpectedly in the middle of the road, without giving any error message/exception. Can anyone give me clue about what might have gone wrong?</p>
  
  <p>I am using jdk1.6 on Mac OS Leopard having 2GB RAM.</p>