---
title: "Meaning & Key Takeaway of: Debugging tip: For server applications…"
description: "\"“Debugging tip: For server applications, be sure to always specify the -server JVM command line switch when invoking the JVM, even for development and ..."
image: "https://sms4smile.com/quotes/i/326/brian-goetz-35377_concurrency_debugging-tip-for-server-applications-be_1267748.jpg"
---

#  Debugging tip: For server applications, be sure to always…

![“Debugging tip: For server applications, be sure to always specify the -server JVM command line switch when invoking the JVM, even for development and testing. The server JVM performs more optimization than the client JVM, such as hoisting variables out of a loop that are not modified in the loop…” quote by Brian Goetz](https://sms4smile.com/quotes/i/326/brian-goetz-35377_concurrency_debugging-tip-for-server-applications-be_1267748.jpg)   [Download](https://sms4smile.com/quotes/i/326/brian-goetz-35377_concurrency_debugging-tip-for-server-applications-be_1267748.jpg) [Open image](https://sms4smile.com/quotes/i/326/brian-goetz-35377_concurrency_debugging-tip-for-server-applications-be_1267748.jpg)

> ““Debugging tip: For server applications, be sure to always specify the -server JVM command line switch when invoking the JVM, even for development and testing. The server JVM performs more optimization than the client JVM, such as hoisting variables out of a loop that are not modified in the loop; code that might appear to work in the development environment (client JVM) can break in the deployment environment (server JVM).””

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Using the server JVM switch enables optimizations that prevent code from failing when moving from development to production.

**In simple terms:** Specify the server JVM for better performance and reliability.

Key Takeaway

Always use the server JVM in production.

Themes

performance optimization reliability

Mood

technical practical

Type

advice technical

When to use this quote

- development
- testing
- production
- performance tuning

Key Concepts

JVM software engineering deployment

Questions to Reflect On

- Do you test both JVM modes?
- How does this affect debugging?

A Different Perspective

Server JVM may not be needed for small scripts; adds complexity.

★ ★ ★ ★ ★   No ratings yet

[Concurrency](https://sms4smile.com/quotes/about/concurrency/) [Programming](https://sms4smile.com/quotes/about/programming/) [Technology](https://sms4smile.com/quotes/about/technology/)

## Related quotes

> [“From the perspective of a class C, an alien method is one whose behavior is not fully specified by C. This includes methods in…](https://sms4smile.com/quotes/brian-goetz/from-the-perspective-of-a-class-c-an-alien-method-is-one-whose/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“When a field is declared volatile, the compiler and runtime are put on notice that this variable is shared and that operations on it…](https://sms4smile.com/quotes/brian-goetz/when-a-field-is-declared-volatile-the-compiler-and-runtime-are-put-on/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Sometimes abstraction and encapsulation are at odds with performance — although not nearly as often as many developers believe — but it is always…](https://sms4smile.com/quotes/brian-goetz/sometimes-abstraction-and-encapsulation-are-at-odds-with-performance/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.”](https://sms4smile.com/quotes/brian-goetz/it-is-far-easier-to-design-a-class-to-be-thread-safe-than-to-retrofit/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Locking can guarantee both visibility and atomicity; volatile variables can only guarantee visibility.”](https://sms4smile.com/quotes/brian-goetz/locking-can-guarantee-both-visibility-and-atomicity-volatile/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Immutable objects are simple. They can only be in one state, which is carefully controlled by the constructor. One of the most difficult elements…](https://sms4smile.com/quotes/brian-goetz/immutable-objects-are-simple-they-can-only-be-in-one-state-which-is/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Accessing shared, mutable data requires using synchronization; one way to avoid this requirement is to not share. If data is only accessed from a…](https://sms4smile.com/quotes/brian-goetz/accessing-shared-mutable-data-requires-using-synchronization-one-way/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“The possibility of incorrect results in the presence of unlucky timing is so important in concurrent programming that it has a name: a race…](https://sms4smile.com/quotes/brian-goetz/the-possibility-of-incorrect-results-in-the-presence-of-unlucky/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Just as it is a good practice to make all fields private unless they need greater visibility, it is a good practice to make…](https://sms4smile.com/quotes/brian-goetz/just-as-it-is-a-good-practice-to-make-all-fields-private-unless-they/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Once an object escapes, you have to assume that another class or thread may, maliciously or carelessly, misuse it. This is a compelling reason…](https://sms4smile.com/quotes/brian-goetz/once-an-object-escapes-you-have-to-assume-that-another-class-or/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Whenever more than one thread accesses a given state variable, and one of them might write to it, they all must coordinate their access…](https://sms4smile.com/quotes/brian-goetz/whenever-more-than-one-thread-accesses-a-given-state-variable-and-one/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Compound actions on shared state, such as incrementing a hit counter (read-modify-write) or lazy initialization (check-then-act), must be made atomic to avoid race conditions.…](https://sms4smile.com/quotes/brian-goetz/compound-actions-on-shared-state-such-as-incrementing-a-hit-counter/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

## More by Brian Goetz

> [“From the perspective of a class C, an alien method is one whose behavior is not fully specified by C. This includes methods in…](https://sms4smile.com/quotes/brian-goetz/from-the-perspective-of-a-class-c-an-alien-method-is-one-whose/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Whenever more than one thread accesses a given state variable, and one of them might write to it, they all must coordinate their access…](https://sms4smile.com/quotes/brian-goetz/whenever-more-than-one-thread-accesses-a-given-state-variable-and-one/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Once an object escapes, you have to assume that another class or thread may, maliciously or carelessly, misuse it. This is a compelling reason…](https://sms4smile.com/quotes/brian-goetz/once-an-object-escapes-you-have-to-assume-that-another-class-or/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Just as it is a good practice to make all fields private unless they need greater visibility, it is a good practice to make…](https://sms4smile.com/quotes/brian-goetz/just-as-it-is-a-good-practice-to-make-all-fields-private-unless-they/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“The possibility of incorrect results in the presence of unlucky timing is so important in concurrent programming that it has a name: a race…](https://sms4smile.com/quotes/brian-goetz/the-possibility-of-incorrect-results-in-the-presence-of-unlucky/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Accessing shared, mutable data requires using synchronization; one way to avoid this requirement is to not share. If data is only accessed from a…](https://sms4smile.com/quotes/brian-goetz/accessing-shared-mutable-data-requires-using-synchronization-one-way/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Immutable objects are simple. They can only be in one state, which is carefully controlled by the constructor. One of the most difficult elements…](https://sms4smile.com/quotes/brian-goetz/immutable-objects-are-simple-they-can-only-be-in-one-state-which-is/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Locking can guarantee both visibility and atomicity; volatile variables can only guarantee visibility.”](https://sms4smile.com/quotes/brian-goetz/locking-can-guarantee-both-visibility-and-atomicity-volatile/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.”](https://sms4smile.com/quotes/brian-goetz/it-is-far-easier-to-design-a-class-to-be-thread-safe-than-to-retrofit/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Sometimes abstraction and encapsulation are at odds with performance — although not nearly as often as many developers believe — but it is always…](https://sms4smile.com/quotes/brian-goetz/sometimes-abstraction-and-encapsulation-are-at-odds-with-performance/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“When a field is declared volatile, the compiler and runtime are put on notice that this variable is shared and that operations on it…](https://sms4smile.com/quotes/brian-goetz/when-a-field-is-declared-volatile-the-compiler-and-runtime-are-put-on/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Compound actions on shared state, such as incrementing a hit counter (read-modify-write) or lazy initialization (check-then-act), must be made atomic to avoid race conditions.…](https://sms4smile.com/quotes/brian-goetz/compound-actions-on-shared-state-such-as-incrementing-a-hit-counter/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

[Explore all 13 Brian Goetz quotes ](https://sms4smile.com/quotes/author/brian-goetz/)

## More Concurrency quotes

> [“From the perspective of a class C, an alien method is one whose behavior is not fully specified by C. This includes methods in…](https://sms4smile.com/quotes/brian-goetz/from-the-perspective-of-a-class-c-an-alien-method-is-one-whose/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Whenever more than one thread accesses a given state variable, and one of them might write to it, they all must coordinate their access…](https://sms4smile.com/quotes/brian-goetz/whenever-more-than-one-thread-accesses-a-given-state-variable-and-one/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Once an object escapes, you have to assume that another class or thread may, maliciously or carelessly, misuse it. This is a compelling reason…](https://sms4smile.com/quotes/brian-goetz/once-an-object-escapes-you-have-to-assume-that-another-class-or/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Just as it is a good practice to make all fields private unless they need greater visibility, it is a good practice to make…](https://sms4smile.com/quotes/brian-goetz/just-as-it-is-a-good-practice-to-make-all-fields-private-unless-they/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“The possibility of incorrect results in the presence of unlucky timing is so important in concurrent programming that it has a name: a race…](https://sms4smile.com/quotes/brian-goetz/the-possibility-of-incorrect-results-in-the-presence-of-unlucky/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Accessing shared, mutable data requires using synchronization; one way to avoid this requirement is to not share. If data is only accessed from a…](https://sms4smile.com/quotes/brian-goetz/accessing-shared-mutable-data-requires-using-synchronization-one-way/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Immutable objects are simple. They can only be in one state, which is carefully controlled by the constructor. One of the most difficult elements…](https://sms4smile.com/quotes/brian-goetz/immutable-objects-are-simple-they-can-only-be-in-one-state-which-is/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Locking can guarantee both visibility and atomicity; volatile variables can only guarantee visibility.”](https://sms4smile.com/quotes/brian-goetz/locking-can-guarantee-both-visibility-and-atomicity-volatile/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“It is far easier to design a class to be thread-safe than to retrofit it for thread safety later.”](https://sms4smile.com/quotes/brian-goetz/it-is-far-easier-to-design-a-class-to-be-thread-safe-than-to-retrofit/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Sometimes abstraction and encapsulation are at odds with performance — although not nearly as often as many developers believe — but it is always…](https://sms4smile.com/quotes/brian-goetz/sometimes-abstraction-and-encapsulation-are-at-odds-with-performance/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“When a field is declared volatile, the compiler and runtime are put on notice that this variable is shared and that operations on it…](https://sms4smile.com/quotes/brian-goetz/when-a-field-is-declared-volatile-the-compiler-and-runtime-are-put-on/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

> [“Compound actions on shared state, such as incrementing a hit counter (read-modify-write) or lazy initialization (check-then-act), must be made atomic to avoid race conditions.…](https://sms4smile.com/quotes/brian-goetz/compound-actions-on-shared-state-such-as-incrementing-a-hit-counter/)

[Brian Goetz](https://sms4smile.com/quotes/author/brian-goetz/)

[Browse all 13 Concurrency quotes ](https://sms4smile.com/quotes/about/concurrency/)

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "“Debugging tip: For server applications, be sure to always specify the -server JVM command line switch when invoking the JVM, even for development and testing. The server JVM performs more optimization than the client JVM, such as hoisting variables out of a loop that are not modified in the loop; code that might appear to work in the development environment (client JVM) can break in the deployment environment (server JVM).”",
            "creator": {
                "@type": "Person",
                "name": "Brian Goetz"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/brian-goetz/debugging-tip-for-server-applications-be-sure-to-always-specify-the/",
            "about": {
                "@type": "Thing",
                "name": "Concurrency"
            },
            "@id": "https://sms4smile.com/quotes/brian-goetz/debugging-tip-for-server-applications-be-sure-to-always-specify-the/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/326/brian-goetz-35377_concurrency_debugging-tip-for-server-applications-be_1267748.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/326/brian-goetz-35377_concurrency_debugging-tip-for-server-applications-be_1267748.jpg",
                "url": "https://sms4smile.com/quotes/i/326/brian-goetz-35377_concurrency_debugging-tip-for-server-applications-be_1267748.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“Debugging tip: For server applications, be sure to always specify the -server JVM command line switch when…” — Brian Goetz",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Brian Goetz",
                    "item": "https://sms4smile.com/quotes/author/brian-goetz/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "“Debugging tip: For server applications, be...",
                    "item": "https://sms4smile.com/quotes/brian-goetz/debugging-tip-for-server-applications-be-sure-to-always-specify-the/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/brian-goetz/debugging-tip-for-server-applications-be-sure-to-always-specify-the/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
