In Eclipse IDE, if your program is consuming a lot of memory (loading big data) with error like java.lang.OutOfMemoryError: Java heap space error. It can easily hit java.lang.OutOfMemoryError: Java heap space : 1. Solution – VM arguments On Eclipse menu, click on Run -> Run Configurations.., select the Java application you want to run, clicks