Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

here how to increase java heap size

Sun May 25, 2008 3:37 pm

Last days, I was working on a project which needs big heap size.And i always have the following exception
"main" java.lang.OutOfMemoryError: Java heap space
I found that the default java heap size is : 128MB , so my application need more about 1GP !!.
So the solution was to make it larger using the following command :

java -Xms<initial heap size> -Xmx<maximum heap size>

like
java -Xms32m -Xmx128m

in netBeans you can change your project heap size from Project Properties :
1.gif
screenshot




Re: here how to increase java heap size

Tue Jun 24, 2008 2:17 pm

In netBeans,Open the configuration file etc/netbeans.conf(In netBeans installed directory) and modify the #netbeans_default_options="-J-Xmx128m to -J-Xmx96m and -J-XX:MaxPermSize=96m to -J-XX:MaxPermSize=64m". This way also we have to increase the Heap size.

Re: here how to increase java heap size

Tue Jun 24, 2008 4:18 pm

Thank you so much for this addition :gOOd: :grin:

Re: here how to increase java heap size

Tue May 05, 2009 1:18 am

Just what I was looking for! cheers.

Re: here how to increase java heap size

Tue Dec 15, 2009 10:02 pm

Thank you ....
you saved my app.. :-)

Re: here how to increase java heap size

Wed Feb 10, 2010 7:51 am

thank you for gave me some knowledge about this topic.

Re: here how to increase java heap size

Mon Feb 22, 2010 8:09 pm

To be precise,

(Java 1.1)
java -ms32m -mx128m MyClassName

(Java 1.2 / 2.0)
java -Xms32m -Xmx128m MyClassName


'X' indicates that these are non-standard options that might not function the same way in future JVMs.

Post a reply
  Related Posts  to : here how to increase java heap size
 Set image size as a percentage of the page size     -  
 Get Directory size in java     -  
 increase the number of bank lines by <br/>     -  
 How can I increase the PageRank of my website on Google?     -  
 How to increase WordPress Blog speed-decrease Page load time     -  
 Array size to zero     -  
 get string size in c++     -  
 What is the size of this Structure     -  
 Nav button size     -  
 how to find size without using sizeof     -