java programs executes in JVM uses Heap of memory to manage the data.
If your Java program requires a large amount of memory, it is possible
that the virtual machine will begin to throw OutOfMemoryError instances
when attempting to instantiate an object. The default heap size if 1 MB
and can increase as much as 16 MB.
run-configuration->-ArgumentTab->Inside VM and insert the paramter.
--click on on apply and run the program.
Thanks
Setting/Increase JVM heap size on Eclipse
Right click on the main program -run-configuration->-ArgumentTab->Inside VM and insert the paramter.
-Xms<
size
>
set
initial Java heap
size
-Xmx<
size
>
set
maximum Java heap
size
such as
-Xms 510 -Xmx 2048
--click on on apply and run the program.
Thanks
No comments:
Post a Comment