If a program throws the error java.lang.OutOfMemoryError: Java heap space, it simply means that the program while running has exhausted all the heap space and even the garbage collector has not been able to reclaim the heap space from unused
How to increase JVM heap size in Eclipse
As discussed in my blog How to solve java.lang.OutOfMemoryError: Java Heap Space, if a Java program running in Eclipse throws java.lang.OutOfMemoryError: Java heap space, one of the solutions to solve this error is to assign more memory for JVM. Following
How to simulate java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space is an error (not an exception) which is thrown by the Java Virtual Machine (JVM) to indicate that it has run out of heap space. You are trying to create new object(s) but the amount of