• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to increase/decrease the heap size in java in windows

 
chaitanya krish
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I want to increase the heap size manually in jvm. How can i increase/decrease the heap size in windows and if we used in eclipse IDE then how can i reduce jvm heap size?
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To do it on the command line, you use -Xmx, for example -Xmx512m to make the max size 512 MB.

To do it in Eclipse, check out Eclipse's docs or help function, or look through its settings for running a program.
 
chaitanya krish
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply. I changed the size in eclipse.ini file . now its working

 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool, glad you got it working. I'm surprised you had to edit the .ini file though. I'd have thought it would be something in the GUI under Preferences or Options or whatever.

Or are you talking about the heap size allocated to Eclipse itself? (I've been thinking you were talking about the heap that is given to your program when you run it in Eclipse.
 
Prabaharan Gopalan
Ranch Hand
Posts: 66
Java Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The .ini file is for the JVM to start Eclipse. Typically, if we have a lot of plug-ins that are loaded during start up, Eclipse often tank with a OOME. As to the application's JVM, we can edit it in the 'Run Configurations' options and pass any standard JVM parameter to it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic