Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hibernate - OutOfMemoryError - java heap size

I'm currently having this problem where I am executing a query that will load large of records. At first execution, it is successful, but when I execute again, I am having java heap size out of memory.

I Know I can increase java heap size using command line, but that requires a compiled jar file. But I am currently on the development process, so how can I increase java heap size in that case?

Im using Elipse as my IDE.

Thanks for any response.

like image 725
Jc dev Avatar asked Dec 02 '25 06:12

Jc dev


1 Answers

It doesn't require a compiled jar file. Choose Run - Run configurations... - Select your run configuration - Arguments tab. Then enter the appropriate command line argument in the VM arguments text box: -Xmx1024m for example.

like image 83
JB Nizet Avatar answered Dec 05 '25 09:12

JB Nizet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!