• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to identify default Java heapsize in Windows

 
Ranch Hand
Posts: 100
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im running an eclipse application in my machine. I have two queries

1. I would like to know how to check the default heap size that the jvm is using to run the application.Im using a windows machine to run the java application. I tried to check the default heap size by the following way
ControlPanel--->Programs--->JavaSetting--> JavaTab -->View Button ---> JavaRuntimeEnvironment settings window ---> Userstab --> Value under RuntimeParameters

But in my system, there is no runtime parameters defined. Is there a command that I can execute via command prompt to check the default heap size in my machine.

2. How to increase the heap size parameter and run the eclipse plugin application from command prompt. For eg: To increase the heap size and execute the jar file we use the below command java -Xms64m -jar MyApp.jar. I would like to know how to set heap parameters and execute my java application which is an exe file. I tried to execute use the below command, but the command prompt doesnot recognise the command
java -Xms512m iepsd.exe

Where iepsd.exe is my java application.
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can run jconsole and connect to the java process to get information about it.
Changing the startup memory depends on how the .exe was created. Normally (e.g in the case of eclipse itself) there would be a settings file for the configuration where you can change the startup settings.
 
Ranch Hand
Posts: 172
Redhat Ruby C++
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse have also eclipse.ini file in the installation folder which it receive those parameters -> http://wiki.eclipse.org/Eclipse.ini
 
Greenhorn
Posts: 4
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you know " java -XX:+PrintFlagsFinal". It prints all possible flags you can pass to the JVM. In addition it also prints the default value for each flag. I have summarized this on my blog here: http://www.pointsoftware.ch/de/cookbook-jvm-memory-arguments/

HTH, Tai
reply
    Bookmark Topic Watch Topic
  • New Topic