Java Heap House is a devoted reminiscence space inside the Java Digital Machine (JVM) that shops object situations. When a brand new object is created, it’s allotted reminiscence from the Java Heap House. If the Java Heap House runs out of reminiscence, a java.lang.OutOfMemoryError exception is thrown.
There are a selection of the way to keep away from java heap area errors. One widespread strategy is to extend the scale of the Java Heap House. This may be performed by setting the -Xmx parameter when beginning the JVM. For instance, the next command will improve the utmost heap dimension to 1GB: