JVM: Options Config File
Java Virtual Machine (JVM) provides a mechanism to set JVM configuration options in jvm.options
file. This file provide a way to tweak configuration based on JVM version too.
8:-Xmx4g
Above configuration means JVM will start with 4G max heap size only if the version of JVM matches 8.
8-:-Xmx4g
Above configuration means JVM will start with 4G max heap size if the version of JVM matches 8 or above.
8-13:-XX:+UseConcMarkSweepGC
14-:-XX:+UseG1GC
Above configuration means JVM will use CMS Garbage Collector for JDKv8 to JDKv13 and G1GC for JDKv14 and above.