File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Performance and the fly likes How to identify default Java heapsize in Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "How to identify default Java heapsize in Windows" Watch "How to identify default Java heapsize in Windows" New topic

How to identify default Java heapsize in Windows

Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 93

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

Joined: Mar 17, 2012
Posts: 877
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

Joined: Feb 07, 2010
Posts: 162

Eclipse have also eclipse.ini file in the installation folder which it receive those parameters ->

Please, visit me for some cool tech post at
Tai Truong

Joined: Oct 16, 2012
Posts: 4

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:

HTH, Tai
It is sorta covered in the JavaRanch Style Guide.
subject: How to identify default Java heapsize in Windows
Similar Threads
Increase JVM Heap size in Tomcat 6.0
JSP, Apache, tomcat problem
Passed 700,701 and 340 last Thursday
Exectuion throwing Out of Memory exception
how to increase jvm heap size in jdk1.5.0