According to Sun, the error happens "if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an Out Of Memory Error will be thrown.".
Apparently, one could use the command line to pass arguments to the JVM for The first approach works fine, the second ends up in another So, question: is there any programmatic alternative to this, for the particular use case (i.e., several small Hash Map objects)?
I am getting this error in a program that creates several (hundreds of thousands) Hash Map objects with a few (15-20) text entries each.
These Strings have all to be collected (without breaking up into smaller amounts) before being submitted to a database.
) is the largest town, and county seat, of South Dublin, Ireland.