java heap space problem...

Hi all,

I am running a program in which i need to fill in an ArrayList with a list of around 1 million strings through 11 for-loops. While the list is being populated, the program throws a java.lang.outofmemoryerror:java heap space.

Any clues on how to correct this error, or on a more efficient method of filling the list?

Thankx :)

[358 byte] By [TJayseea] at [2007-11-27 11:32:10]
# 1

Maybe you can use ResourceBundle?

http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html

Oh, and give the JVM more memory with the -Xmx option.

Message was edited by:

tschodt

tschodta at 2007-7-29 16:43:59 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

Hmm how do I give the JVM more memory through Netbeans?

Still wading through ResourceBundle....

TJayseea at 2007-7-29 16:43:59 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

> Hmm how do I give the JVM more memory through Netbeans?

Try asking in a Netbeans forum.

tschodta at 2007-7-29 16:43:59 > top of Java-index,Java HotSpot Virtual Machine,Specifications...