I was using a tool. The JVM option is configurable.
Recently, I get a OutOfMemoryError so I add -Xmx1024m in the option configuration as below.
The config.properties: JVM_OPTION="-Xmx4096m -XX:-UseGCOverheadLimit"
The cmd log before: java -Xms16777216 -Xmx50m com.f.Startmain
The cmd log now: java -Xms16777216 -Xmx50m com.f.Startmain -Xmx4096m -XX:-UseGCOverheadLimit
The tool is still out of memory now as the -Xmx4096m is not overwrite the old one. The tool is not modifiable, and the configuration is only adding new options at the end of the command.
Could someone know a method to overwrite -Xmx50m in JVM options?