Resolving Java Heap Space Error
My previous code processed two tables with thousands of rows and had problem with Java Heap Space like shown below:
To overcome this out of memory problem, we should increase the heap size by typing this on command prompt:
And now it works:
More useful links about Java heap space:
- http://javarevisited.blogspot.com/2011/09/javalangoutofmemoryerror-permgen-space.html
- http://javarevisited.blogspot.com/2011/05/java-heap-space-memory-size-jvm.html
- http://stackoverflow.com/questions/1565388/increase-heap-size-in-java
- http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html
- http://viralpatel.net/blogs/jvm-java-increase-heap-size-setting-heap-size-jvm-heap/
- http://www.devx.com/tips/Tip/5578
- http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac55070_.htm
- http://www.ehow.com/how_5347474_set-java-heap-space.html
Reply