Possible Duplicate:
Setting JVM heap size at runtime
Is it possible to prevent a program from crashing when it encounters a OutOfMemoryError
by increasing the memory allowed to the program?
Can it be done at run time?
Reason for increasing the memory
I was talking a lot of screen shots using java.awt.Robot
and after some time my Vector ran out of memory. At 60 BufferedImage
it was out.
so 1280 x 800 resolution, 3 byte RGB BufferedImage
and 60 images later, the vector was out.
So I guess the memory consumed was
1280 x 800 x 60 x 3 = do the math bytes