Skip to main content

java.lang.OutOfMemoryError: Java heap space

2 replies [Last post]
saran
Offline
Joined: 2005-02-04
Points: 0

i'm getting java.lang.OutOfMemoryError: Java heap space when i'm trying to read a file of 6mb and storing the contents in an arraylist..please help me to solve this problem.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the0retic
Offline
Joined: 2011-05-09
Points: 0

Hello.
What JVM parameters do you use? It seems that you haven`t enought memory for Java heap (you can fix it by setting -Xms<initial heap size> -Xmx<max heap size> paramterers)
Or, you have a memory leak in your application.

saran
Offline
Joined: 2005-02-04
Points: 0

thanks for your reply.
i solved it by setting the max heap size