Search code examples
javajvmjvm-hotspot

Difference in client/server JVM options


In the Java Hotspot compiler, what the difference between initializing Java with -client as opposed to -server, and what are the pros/cons/caveats of each?


Solution

  • Nice information can be found in Oracle Documentation and Java Hotspot VM FAQ. Acording to them, a Java HotSpot Server VM:

    • Is intended for running server applications.
    • Prefers to maximize operating speed instead of minimizing start-up time.

    On the other side, a Java HotSpot Client VM:

    • Is better suited for GUI applications
    • Is intended to provide fast start-up times or small footprints.