OutOfMemoryError....!

i have got this error when i complied my program.i don't know what to do

the System is out of resoures

public class OutOfMemoryError.

Consult the following stack trace for details.

java.lang.outOfMemoryError

when i looked for help it says...!

extends VirtualMachineError

Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.

Can some one please tell me what should i do to solve this problem

thanks

-VIJAY

[583 byte] By [hyd_jamesbond] at [2007-9-30 21:22:21]
# 1
hi,I think some where u r using memory which is exceeding the availability at your side. for example u r creating String [] args1=new String[30000] // wil workin loops then after some time it cause problem.Bcos ig cant be preenmpted by Garbage collectorsivajik
sivaji_sun at 2007-7-7 2:54:29 > top of Java-index,Administration Tools,Sun Connection...
# 2
what is the command line that produces the error?-Alexis
am74686 at 2007-7-7 2:54:29 > top of Java-index,Administration Tools,Sun Connection...
# 3
try to start up the application using -Xms and -Xmx.Further information on http://java.sun.com/docs/hotspot/VMOptions.html http://java.sun.com/docs/hotspot/gc/index.html
ROCLI at 2007-7-7 2:54:29 > top of Java-index,Administration Tools,Sun Connection...
# 4
when you run the program just add this line -Xms10-Xmx100javafilename.java (this will increase the memory allocation to JVM) if it is not working then try this -Xms20-Xmx200javafilename.java If you solve you problem mail me ongotherwal@yahoo.com
gotherwal at 2007-7-7 2:54:29 > top of Java-index,Administration Tools,Sun Connection...