Wednesday, March 9, 2011

Handling "java.lang.OutOfMemoryError" - notes.ini Keyword: JavaMaxHeapSize

Syntax: JavaMaxHeapSize=number of bytes

Example: JavaMaxHeapSize=67108864

Default value: 67108864 (64mb)

Specifies the maximum--not initial--size the Java heap can reach. The Java Virtual Machine (JVM) starts out at 16MB of heap space and most of it is uncommitted. If the JVM needs more heap than it currently has, it will expand the heap in increments but will not exceed the maximum. Exceptions such as "java.lang.OutOfMemoryError" indicate that a heap has reached its maximum size. You can specify the number of bytes directly or use the suffix "MB" to indicate megabytes, for example, specifying "64MB" is the same as specifying "67108864."

Resource obtained from :
Hope this helps :)


  1. Thank you for this helpful stuff I got at your site. The stuff here is really good and keep up sharing.

    PIC Claim

  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.