You're essentially running out of memory to run the process smoothly. Options that come to mind:
-Xmx512m
HashMap
String.intern()
HashMap(int initialCapacity, float loadFactor)
2.1m questions
2.1m answers
60 comments
57.0k users