Increase General Java Tool Heap Size
This topic explains how to increase the Java heap size for Java tools that are not specifically covered in other sections. You would do this if you have out-of-memory errors that cause the tool to fail.
About this task
This step applies to Java tools that you start with one of these
commands:
java -jar ...
java -cp ...
This task references the Oracle Java -Xmssize and -Xmxsize options. For details about the default settings and information about those options in general see the Oracle Java documentation.
Procedure
Add the -Xmssize and
-Xmxsize options to the start-up
commands to increase the Java heap size.
These examples set the starting heap sizes to 1 GB and the maximum heap sizes
to 2 GB, respectively:
java -Xms1G -Xmx2G -jar ...
java -Xms1G -Xmx2G -cp ...