In Windows Environment, while Java application execution, It acquires some memory that is called Java Heap Memory which is configurable. If you are your machine chokes while running Java Application then all you need to increase Java heap memory to prevent chocking And to cater Java Application performance issues.
Follow the below steps to configure Java Heap Memory for your Java Runtime Environment.
Step 1 – Go To the “Control Panel”, Look for “Java” Icon and Click on it to open. (See image Below)
Step 2 – Once Java Control Panel Opens, Click on “Java” Tab to active.
Inside Java Tab Click on “View” Button to Open Java Runtime Environment Setting. (See Image Below)
Step 3 – Once Java Runtime Environment Setting Dialogue Pop-Ups, Update the Value Under Runtime Parameter Column by Double Click on it. Click on OK Button to set the value and exit from Java Runtime Environment Settings.
Step 4 – Click On “Apply” Button to apply these changes and then Click on Ok button to Exit from Java Control Panel.
Please note that there is no space in the Value and begins with ” – “ sign. (See Image Below)
Below are Values you can assign to allocate runtime memory to java Application:
type -Xmx512m for 512MB memory.
type -Xmx1024m for 1GB memory.
type -Xmx2048m for 2GB memory.
type -Xmx3072m for 3GB memory, and so on.
That’s all! Changes are configured Now, and there is no need to restart of your machine. the changes are applied on real time. Keep in mind, the allocation of the memory is depends on the number of Memory Sticks that are available on your machine. This is temporary memory that will assigned
at runtime to execute java application without choking or performance hazards.
This tutorial is useful for Win Xp, 7, 8 and 10.
Hope This Helps!