Chapter 6. Configuring the heap size for Red Hat build of OpenJDK application on RHEL
You can configure Red Hat build of OpenJDK to use a customized heap size.
Procedure
Add the maximum heap size option to the
javacommand when running your application. For example, to set the maximum heap size to 100 megabytes, use the-Xmx100moption:java -Xmx100m <your_application_name>
$ java -Xmx100m <your_application_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional resources
-
For more information about the
Xmxoption, see -Xmxsize in the Java documentation.
Revised on 2024-11-18 12:58:13 UTC