Exception in thread java.lang.OutOfMemoryError: Java heap space

Issue : java.lang.OutOfMemoryError: Java heap space

Solution :
It means that the JVM has
run out of all the memory that has been allocated to it. You can change
the amount of memory allocated for use by your JVM using the -Xms and
-Xmx command line parameters.


For example, the following says run MyApp in a JVM and allocate a
minimum of 5 Megabytes and a maximum of 15 Megabytes off of the heap in
order to do so.

java -Xms5m -Xmx15m MyApp



No comments:

Post a Comment