Java – set the default heap size in windows

See the English answer > how to increase Java heap memory permanently? three

Solution

Java_ Opts is set to a system variable with the following:

JAVA_ OPTS =“ – Xms256m -Xmx512m”

After that, run the following command at the command prompt:

SET JAVA_OPTS="-Xms256m -Xmx512m"

This can be explained as follows:

>Allocate at least 256MB of heap > allocate at most 512MB of heap

These values should be changed according to the application requirements

Edit:

You can also try to add it through the Environment Properties menu, which can be found in the following location:

>From the desktop, right-click My computer, and then click properties. > Click the "advanced system settings" link in the left column. > Click the Environment Variables button in the system properties window. > Click new to add a new variable name and value. > For the variable name, enter the Java of the variable value_ Opts, enter - xms256m - xmx512m > click OK and close the System Properties tab. > Restart any Java application

Edit 2:

JAVA_ Opts is a system variable used to store various settings / configurations of the local Java virtual machine Through Java_ Opts is set as the system variable from which all applications running at the top of the JVM will be set

To set system variables, you must complete steps 1 to 4 above

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>