"Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space

Dear forum members,I am a student and i run a crawler which after a while stops because of "Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space". I use Netbeans 5,5 and I have on my machine 4GBytes RAM. Can anyone help me?Thank you!!!
[278 byte] By [anastasiosa] at [2007-11-26 12:56:30]
# 1

If you haven't already, try increasing the heap by using the java command option -Xmxnm, where n is the heap in MB. Assuming you are using Win 32 XP, you'll find that your maximum value will be somewhere between 1200MB and 1700MB (approx.) This is a limitation of Windows, not much can be done to change it.

You can use this command with varying values of MB to find your maximum:

java -Xmx1330m -version

ChuckBinga at 2007-7-7 16:51:26 > top of Java-index,Desktop,Developing for the Desktop...