Sun May 25, 2008 2: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>
java -Xms32m -Xmx128m
in netBeans you can change your project heap size from Project Properties :
Tue Jun 24, 2008 1: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.
Tue Jun 24, 2008 3:18 pm
Thank you so much for this addition
Tue May 05, 2009 12:18 am
Just what I was looking for! cheers.
Tue Dec 15, 2009 9:02 pm
Thank you ....
you saved my app.. :-)
Wed Feb 10, 2010 6:51 am
thank you for gave me some knowledge about this topic.
Mon Feb 22, 2010 7:09 pm
To be precise,
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.