How to Increase Java Memory in Windows 7: 9 Steps

Table of contents:

How to Increase Java Memory in Windows 7: 9 Steps
How to Increase Java Memory in Windows 7: 9 Steps
Anonim

The use of Java applications on computers requires a memory called Java memory ("Java heap"). Often, it is necessary to increase this memory to avoid slowing down the operation of the application. Here's how to do it in Windows 7.

Steps

Increase Java Memory in Windows 7 Step 1
Increase Java Memory in Windows 7 Step 1

Step 1. Go to the Control Panel

Click on "Start", then on "Control Panel".

Increase Java Memory in Windows 7 Step 2
Increase Java Memory in Windows 7 Step 2

Step 2. Select “Programs”

In the left column of the Control Panel click on "Programs", the one written in green, Not the "Uninstall a program" written in blue.

Increase Java Memory in Windows 7 Step 3
Increase Java Memory in Windows 7 Step 3

Step 3. Go to Java settings

In the following window, click on "Java", usually at the bottom of the other programs; The "Java Control Panel" window will open.

Increase Java Memory in Windows 7 Step 4
Increase Java Memory in Windows 7 Step 4

Step 4. Choose the “Java” panel

In the Java panel, click on the "View" button. The "Java Runtime Environment Settings" will open.

Increase Java Memory in Windows 7 Step 5
Increase Java Memory in Windows 7 Step 5

Step 5. Change the amount of space

In the parameter column ("Runtime Parameters") change the value, or if it is empty, decide the new value of the Java memory.

Increase Java Memory in Windows 7 Step 6
Increase Java Memory in Windows 7 Step 6

Step 6. Edit the parameter

To modify it, double click on the parameter column and then,

  • type -Xmx512m to dedicate 512MB of memory for Java.
  • type -Xmx1024m to dedicate 1GB of memory for Java.
  • type -Xmx2048m to dedicate 2GB of memory for Java.
  • type -Xmx3072m to dedicate 3GB of memory for Java, and so on.
  • Watch out for the initial minus sign and the final "m".
  • Also note the absence of spaces between letters and numbers.
Increase Java Memory in Windows 7 Step 7
Increase Java Memory in Windows 7 Step 7

Step 7. Close the window

Click on "OK" in the Java settings to close them.

Increase Java Memory in Windows 7 Step 8
Increase Java Memory in Windows 7 Step 8

Step 8. Close the Java window

The "Apply" button in the "Java Control Panel" is now active. You should click on “Apply” to activate the new Java memory. Then click "OK".

Increase Java Memory in Windows 7 Step 9
Increase Java Memory in Windows 7 Step 9

Step 9. Close the Windows 7 Control Panel

Advice

  • It is not necessary to restart the computer after changing the Java memory.
  • The value you choose depends on how much memory your computer has and how much is being consumed by all running processes.
  • This is a 'temporary' amount of memory available to Java applications while you use them. It does not "steal" or permanently steal memory from your computer. It is only a guarantee for the Java Virtual Machine.
  • If Java can't find enough memory, it throws an "exception" message to Windows, like this: "Exception in thread" main "java.lang. OutOfMemoryError: Java heap space."
  • This method also works with Windows 8.
  • This method, with some modifications, can also be used in Windows XP.

Recommended: