Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit


This option removes stack traces from exceptions.


Setting Effect Default
-XX:-StackTraceInThrowable Disable No

While stack traces are included in exceptions by default, recording them can have a negative impact on performance. Use this option if you want to remove stack traces, although this might cause difficulties with problem determination.

When this option is enabled, Throwable.getStackTrace() returns an empty array and the stack trace is displayed when an uncaught exception occurs. Thread.getStackTrace() and Thread.getAllStackTraces() are not affected by this option.

See also