Total members 11895 |It is currently Sun Dec 22, 2024 2:20 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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 :
Attachment:
File comment: screenshot
1.gif
1.gif [ 26.86 KiB | Viewed 66826 times ]




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

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.


Author:
Newbie
User avatar Posts: 10
Have thanks: 0 time

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

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

Just what I was looking for! cheers.


Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

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


Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

thank you for gave me some knowledge about this topic.


Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

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.


Author:
Newbie
User avatar Posts: 19
Have thanks: 0 time
Post new topic Reply to topic  [ 7 posts ] 

  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     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com