In this article, we'll show you how to increase the amount of random access memory (RAM) that a Java program can use in Windows 7. Increasing the amount of RAM will allow Java programs to run faster and consume more system resources, thus terminating Java processes faster.
Steps

Step 1. Update Java (if necessary)
If you are not using the most recent version of Java, update it by following these steps:
- Go to https://www.java.com/en/download/ in your computer's web browser.
- Click "Download Java Free" in the middle of the page.
- Click “Agree and Start Free Download” at the top of the page.
- Double click on the downloaded file.
- Follow the instructions on the screen.

Step 2. Open the Start Menu

Click on the Windows logo in the lower left corner of the screen.

Step 3. Click on Control Panel
It's on the right side of the Start menu. The Control Panel will open.

Step 4. Open the "View" menu
It's in the upper-right side of the page.

Step 5. Click on Large Icons
This option is on the menu. The contents of the Control Panel will appear as individual icons, not links.

Step 6. Click Java
This option is in the Control Panel window. The Java window will open.
In some cases, you need to click "Java (32-bit)"

Step 7. Click on the Java tab
It's at the top of the Java window. Then click View.

Step 8. Double-click the "Runtime Parameters" text box
This is an empty text box to the right of the Java version number. The mouse cursor appears in the text box.

Step 9. Enter the memory value
Enter -Xms, the amount (in megabytes) of memory you want to use, followed by the letter "m" (for example, enter -Xms512m to allow Java to use 512 MB of RAM). Other common meanings are:
- -Xms1024m: Java will use 1GB of RAM.
- -Xms2048m: Java will use 2GB of RAM.
- -Xms3072m: Java will use 3GB of RAM.

Step 10. Press ↵ Enter
The entered value will be added to the text box.

Step 11. Click Apply
This button is at the bottom of the window. The changes will take effect.

Step 12. Click on OK
This button is at the bottom of the window. The Java window will close. Java programs will now use the specified amount of RAM.