• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

how to know the heap size ?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
i m new to java/j2ee and for that sake any IDE .. rite now i hav started using eclipse. at times, it gives me an error that says i m out of heap size memory and that i hav to use the -vmargs -xmx in command line option . wat is this heap memory ? and how do i know how much i m allocated currently and if i really need an increase in the heap size and if yes, the step by step procedure to do it...

thanx in advance.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the IDEs forum.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

When Eclipse is launched, it will take up the configuration settings from the eclipse.ini file, in which you can specify the VM args.

1. Edit the eclipse configuration settings file <EclipseHome>/eclipse.ini
2. You can specify your vm arguments in this file.

eg. -vm C:\j2sdk1.4.2_03\jre\bin\javaw.exe -vmargs -Xms256m -Xmx512m

Here,
-vm is used to specify the Java VM to be used.
-vmargs is used to specify the list of arguments to be passed to the VM.

However, these above setting will only change the memory given to your eclipse runtime, and not to any java applications which you may be running from within Eclipse. For such apps, you may have to set the VMargs, in the launch configuration dialogue box, where you create, manage and run your java apps.

ie. go to Run -> Run -> Java application -> arguments -> VM arguments. This will configure the VM of the actual java application that you are running thru Eclipse.

Hope this helps.
Suhaasi.
 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you suhaasi....

i hav made the needed changes... but i stil dunno if it works .. coz, that error comes once in 15 times !

anyways, thanx for the quick reply...
 
This tiny ad is suggesting that maybe she should go play in traffic.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic