Out of memory error
Java
Runtime Environments by default limit the amount of memory they will
allow Java applications to consume. If you're using a JRE from Sun, you can
use the -Xmx option to specify a higher value (in
bytes)
Eg: java –Xmx1000000000 MyProg
Where 1000000000 is the no.of
bytes
To check
the actual JVM size, either check your process memory on the OS
:
long totalMemoryAllocated = Runtime.getRuntime().totalMemory();
If u want to configure in Tomcat use this…
In \Program Files\Apache software Foundation\Tomcat
5.0\bin\catalina.bat, in the last section immediately after "rem Execute Java with the applicable properties",
insert this line,
set CATALINA_OPTS=-mx1024m. Save the file. (only
this line is enough)