JVM Options

[Updated: Feb 11, 2016, Created: Feb 11, 2016]

Java JVM Options 

There are usually three main parts of executing a program from command line.

Program name + Options + Arguments

Options are obviously optional directives to the programs.

Options can be key value pair or they can be boolean flags.

To run java program we use 'java' command.

The options to run 'java' command are usually known as JVM Options. The general syntax is given by:

java [options] className/jarName [args]

Options related to HotSpot JVM (Oracle implementation of JVM specifications) are divided into following groups:

Standard Options: Common settings. These are the only options which are supported not only by HotSpot but all other JVMs.

Non-Standard Options: General purpose, starts with -X.

Advanced Runtime Options: Developer's tuning options. Starts with -XX.

Advanced JIT Compiler Options: JIT compiler settings. Starts with -XX.

Advanced Serviceability Options: For system investigating and extensive debugging. Starts with -XX.

Advanced Garbage Collection Options: Fine tuning GC. Starts with -XX.

Java Launcher Reference

See Also