Total members 9951 | Gratitudes |It is currently Sat Feb 11, 2012 10:15 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 7 posts ] 
Author Question
 Question subject: here how to increase java heap size
PostPosted: Sun May 25, 2008 3:37 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 56 time

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 38561 times ]

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: here how to increase java heap size
PostPosted: Tue Jun 24, 2008 2:17 pm 
Offline
Newbie
User avatar

Joined: Fri May 16, 2008 8:10 am
Posts: 10
Has thanked: 0 time
Have thanks: 0 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.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: here how to increase java heap size
PostPosted: Tue Jun 24, 2008 4:18 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 56 time
Thank you so much for this addition :gOOd: :grin:

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: here how to increase java heap size
PostPosted: Tue May 05, 2009 1:18 am 
Offline
Newbie
User avatar

Joined: Mon May 04, 2009 7:29 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Just what I was looking for! cheers.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: here how to increase java heap size
PostPosted: Tue Dec 15, 2009 10:02 pm 
Offline
Newbie
User avatar

Joined: Tue Dec 15, 2009 9:59 pm
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Thank you ....
you saved my app.. :-)


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: here how to increase java heap size
PostPosted: Wed Feb 10, 2010 7:51 am 
Offline
Newbie
User avatar

Joined: Wed Feb 10, 2010 7:41 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
thank you for gave me some knowledge about this topic.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: here how to increase java heap size
PostPosted: Mon Feb 22, 2010 8:09 pm 
Offline
Newbie
User avatar

Joined: Mon Feb 22, 2010 12:10 pm
Posts: 21
Location: Let me check my GPS!
Has thanked: 1 time
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.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 7 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 Java seminar topic with demo  Java  Anonymous  1
 java project code  Java  Anonymous  0
 change Font of text in java  Java examples  msi_333  1
 Read your gmail using Java code  Java examples  msi_333  5
 project source code in java  Java  Anonymous  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 6 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team