I have to deal with a directory of about 2 million xml\'s to be processed.
I\'ve already solved the processing distributing the work between machines and threads us
At fist you could try to increase the memory of your JVM with passing -Xmx1024m e.g.