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.


  • Add the maximum heap size option to the java command when running your application. For example, to set the maximum heap size to 100 megabytes, use the -Xmx100m option:

    $ java -Xmx100m <your_application_name>

Additional resources

Revised on 2023-11-14 18:18:46 UTC