How to avoid OutOfMemoryError

In my information retrieval project, I have to build a vector space model. So there are three arrays, i.e. a string array IndexTerm, a string array FileName[j], and a double array weight[j]. The total number of the files is about ten thousand, while the number of index terms might be twenty thousand. This causes a serious problem, i.e. java.lang.OutOfMemoryError

Could anybody tell me how to avoid this without reducing the number of files and index terms?

[485 byte] By [Wenxiaoa] at [2007-10-2 10:24:40]
# 1
Please don't post your question multiple times, it just wastes effort and causes duplicated replies.Already answered.
ChuckBinga at 2007-7-13 1:59:11 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...