The defaulf size of JVM memory allocation pool size is 64 MB. In some cases, big matrices storing images need to be created, which are usually larger than the limit. Therefore, a big size has to be set.
The following part explains how to increase the limit.
java [ options ] class [ argument ... ]
java [ options ] -jar file.jar [ argument ... ]
javaw [ options ] class [ argument ... ]
javaw [ options ] -jar file.jar [ argument ... ]
-Xmsn
Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:
-Xms6291456
-Xms6144k
-Xms6m
-Xmxn
Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples:
-Xmx83886080
-Xmx81920k
-Xmx80m
from : http://blog.lib.umn.edu/sunx0170/ThinkU/023236.html
more: http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/java.html