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.
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.
thanks for your reply.
i solved it by setting the max heap size
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.