Where can I permanently set java heap size on Windows pc?
Solution 1
You can use the JAVA_OPTS environment variable for dealing with java heap size.
This variable can be added as a environment variable as well as you can define a configuration line in the startup.bat
file.
Add the following line in the startup.bat
file.
set JAVA_OPTS=-Xms512m -Xmx512m
You can add this as environment variable as said.
Solution 2
These parameters are passed to JVM via command line: -Xms and -Xmx For more information run java -X.
katura
Updated on July 05, 2022Comments
-
katura almost 2 years
I recently downloaded the latest Java 1.6 JDK. I'm using VisualVM which came with the SDK to test/monitor my webapp (using Tomcat server) on my local pc. I'm running Windows XP.
Where are the parameters located for setting the min. and max. java heap size? VisualVM indicates that the max. heap is at about 256mb. I looked in the server.xml file for Tomcat, but didn't find any settings in there.
Thank you