Skip to content

-XX:SharedCacheHardLimit

Specifies the size for a new shared classes cache. Use this option together with the -Xscmx option to set actual and soft maximum size limits respectively.

Syntax

    -XX:SharedCacheHardLimit=<size>
Setting Value Default
<size> [1[k|K|m|M|g|G] or greater]

See Using -X command-line options for more information about the <size> parameter.

When you use this option with the -Xscmx option, the -Xscmx option sets the soft maximum size, and the -XX:SharedCacheHardLimit option sets the actual size, of a new shared classes cache. For more information, see -Xscmx.

If you use this option without the -Xscmx option, the behavior is the same as using the -Xscmx option by itself; both options set the actual size of the shared classes cache.

For more information about cache sizes, see Cache size limits.

Example

The following settings, when used together, set the soft maximum size of the shared classes cache to 16 MB and the actual maximum cache size to 64 MB.

-XX:SharedCacheHardLimit=64m -Xscmx16m

See also