Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to identify default Java heapsize in Windows

 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • Mark post as helpful
  • send pies
  • 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.
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • 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.
 
Luan Cestari
Ranch Hand
Posts: 172
C++ Redhat Ruby
  • Mark post as helpful
  • send pies
  • 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
 
Tai Truong
Greenhorn
Posts: 4
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic