How do I override the JVM Heap Size?

If you’ve ever received a java.lang.OutOfMemoryError when processing a large amount of data, there’s a chance you need to manually specify the JVM size if you can. Here’s an example…

java -Xms64m -Xmx256m MyProgram

… Of course, another option you may want to consider is to structure your program more efficiently (i.e. don’t store all that data in memory, process in blocks, use a tool more suitable to the task like BCP or DB2 LOAD).

Want to read more on the subject? Read this

Leave a Reply