skip to content
Pradeep Chhetri

Software Engineer. Writing about databases, infrastructure, and distributed systems.

Main navigation

  • Home
  • Blog
  • TIL
GitHub LinkedIn RSS

JVM: Options Config File

October 6, 2020 · TIL

Tags:
  • jvm

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.

© 2026 Pradeep Chhetri