blob: 7408d3c222cbd45beecc873422de2024d4c898e8 [file] [log] [blame]
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="Eclipse OpenJ9 documentation">
<link rel="canonical" href="https://www.eclipse.org/openj9/docs/xshareclasses/">
<meta name="lang:clipboard.copy" content="">
<meta name="lang:clipboard.copied" content="">
<meta name="lang:search.language" content="">
<meta name="lang:search.pipeline.stopwords" content="">
<meta name="lang:search.pipeline.trimmer" content="">
<meta name="lang:search.result.none" content="">
<meta name="lang:search.result.one" content="">
<meta name="lang:search.result.other" content="">
<meta name="lang:search.tokenizer" content="">
<link rel="shortcut icon" href="../cr/oj9logo_img9.ico">
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-3.0.4">
<title>-Xshareclasses - </title>
<link rel="stylesheet" href="../assets/stylesheets/application.1b62728e.css">
<link rel="stylesheet" href="../assets/stylesheets/application-palette.a8b3c06d.css">
<meta name="theme-color" content="#00bcd4">
<script src="../assets/javascripts/modernizr.268332fc.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="../assets/fonts/material-icons.css">
<link rel="stylesheet" href="../stylesheets/oj9.css">
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f (https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore%28j,f) );
})(window,document,'script','dataLayer','GTM-5WLCZXC');</script>
<!-- End Google Tag Manager -->
</head>
<body dir="" data-md-color-primary="cyan" data-md-color-accent="cyan">
<svg class="md-svg">
<defs>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="../#-xshareclasses" tabindex="1" class="md-skip">
</a>
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="https://www.eclipse.org/openj9/docs" title=" " class="md-header-nav__button md-logo">
<img src="../cr/openj9_6b.png">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/eclipse/openj9-docs/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</div>
<!-- Eclipse Incubator link -->
<div class="md-flex__cell md-flex__cell--shrink">
<a href="http://wiki.eclipse.org/Development_Resources/Process_Guidelines/What_is_Incubation" target="_blank"><img class="egg" src="../cr/egg-incubation.png" alt="Eclipse Incubation"></a>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="https://www.eclipse.org/openj9/docs" title=" " class="md-nav__button md-logo">
<img src="../cr/openj9_6b.png" width="48" height="48">
</a>
</label>
<div class="md-nav__source">
<a href="https://github.com/eclipse/openj9-docs/" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." title="About" class="md-nav__link">
About
</a>
</li>
<li class="md-nav__item">
<a href="../adoptopenjdk/" title="AdoptOpenJDK builds" class="md-nav__link">
AdoptOpenJDK builds
</a>
</li>
<li class="md-nav__item">
<a href="../introduction/" title="Getting started" class="md-nav__link">
Getting started
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_newuser/" title="New to OpenJ9?" class="md-nav__link">
New to OpenJ9?
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
<label class="md-nav__link" for="nav-5">
Release notes
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-5">
Release notes
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../openj9_releases/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item">
<a href="../version0.19/" title="Version 0.19.0" class="md-nav__link">
Version 0.19.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.18/" title="Version 0.18.1" class="md-nav__link">
Version 0.18.1
</a>
</li>
<li class="md-nav__item">
<a href="../version0.17/" title="Version 0.17.0" class="md-nav__link">
Version 0.17.0
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-5-5" type="checkbox" id="nav-5-5">
<label class="md-nav__link" for="nav-5-5">
Earlier releases
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-5-5">
Earlier releases
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../version0.16/" title="Version 0.16.0" class="md-nav__link">
Version 0.16.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.15/" title="Version 0.15.1" class="md-nav__link">
Version 0.15.1
</a>
</li>
<li class="md-nav__item">
<a href="../version0.14/" title="Version 0.14.0" class="md-nav__link">
Version 0.14.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.13/" title="Version 0.13.0" class="md-nav__link">
Version 0.13.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.12/" title="Version 0.12.0" class="md-nav__link">
Version 0.12.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.11/" title="Version 0.11.0" class="md-nav__link">
Version 0.11.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.10/" title="Version 0.10.0" class="md-nav__link">
Version 0.10.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.9/" title="Version 0.9.0" class="md-nav__link">
Version 0.9.0
</a>
</li>
<li class="md-nav__item">
<a href="../version0.8/" title="Version 0.8.0" class="md-nav__link">
Version 0.8.0
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../gc/" title="Garbage Collection" class="md-nav__link">
Garbage Collection
</a>
</li>
<li class="md-nav__item">
<a href="../jit/" title="JIT Compiler" class="md-nav__link">
JIT Compiler
</a>
</li>
<li class="md-nav__item">
<a href="../jitserver/" title="JITServer (tech. preview)" class="md-nav__link">
JITServer (tech. preview)
</a>
</li>
<li class="md-nav__item">
<a href="../aot/" title="AOT Compiler" class="md-nav__link">
AOT Compiler
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10">
<label class="md-nav__link" for="nav-10">
Class data sharing
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-10">
Class data sharing
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../shrc/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item">
<a href="../shrc_diag_util/" title="Diagnostic cache utilities" class="md-nav__link">
Diagnostic cache utilities
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-11" type="checkbox" id="nav-11">
<label class="md-nav__link" for="nav-11">
Diagnostics
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-11">
Diagnostics
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../diag_overview/" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-11-2" type="checkbox" id="nav-11-2">
<label class="md-nav__link" for="nav-11-2">
Dumps
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-11-2">
Dumps
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../dump_javadump/" title="Java dump" class="md-nav__link">
Java dump
</a>
</li>
<li class="md-nav__item">
<a href="../dump_heapdump/" title="Heap dump" class="md-nav__link">
Heap dump
</a>
</li>
<li class="md-nav__item">
<a href="../dump_systemdump/" title="System dump" class="md-nav__link">
System dump
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-11-3" type="checkbox" id="nav-11-3">
<label class="md-nav__link" for="nav-11-3">
Tools
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-11-3">
Tools
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../tool_jextract/" title="Dump extractor" class="md-nav__link">
Dump extractor
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jdmpview/" title="Dump viewer" class="md-nav__link">
Dump viewer
</a>
</li>
<li class="md-nav__item">
<a href="../tool_traceformat/" title="Trace formatter" class="md-nav__link">
Trace formatter
</a>
</li>
<li class="md-nav__item">
<a href="../tool_builder/" title="Option builder" class="md-nav__link">
Option builder
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jcmd/" title="Java command (jcmd) tool" class="md-nav__link">
Java command (jcmd) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jmap/" title="Java memory map (jmap) tool" class="md-nav__link">
Java memory map (jmap) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jps/" title="Java process status (jps)" class="md-nav__link">
Java process status (jps)
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jstack/" title="Java stack (jstack) tool" class="md-nav__link">
Java stack (jstack) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_jstat/" title="Java statistics monitoring (jstat) tool" class="md-nav__link">
Java statistics monitoring (jstat) tool
</a>
</li>
<li class="md-nav__item">
<a href="../tool_migration/" title="Switching to OpenJ9" class="md-nav__link">
Switching to OpenJ9
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-11-4" type="checkbox" id="nav-11-4">
<label class="md-nav__link" for="nav-11-4">
Interfaces
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-11-4">
Interfaces
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../interface_jvmti/" title="JVMTI" class="md-nav__link">
JVMTI
</a>
</li>
<li class="md-nav__item">
<a href="../interface_dtfj/" title="DTFJ" class="md-nav__link">
DTFJ
</a>
</li>
<li class="md-nav__item">
<a href="../interface_lang_management/" title="Language Management" class="md-nav__link">
Language Management
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12" type="checkbox" id="nav-12" checked>
<label class="md-nav__link" for="nav-12">
Command-line options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-12">
Command-line options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../cmdline_specifying/" title="Specifying options" class="md-nav__link">
Specifying options
</a>
</li>
<li class="md-nav__item">
<a href="../cmdline_general/" title="Standard options" class="md-nav__link">
Standard options
</a>
</li>
<li class="md-nav__item">
<a href="../cmdline_migration/" title="Switching to OpenJ9" class="md-nav__link">
Switching to OpenJ9
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12-4" type="checkbox" id="nav-12-4">
<label class="md-nav__link" for="nav-12-4">
System property options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-12-4">
System property options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../d_jvm_commands/" title="Using System properties" class="md-nav__link">
Using System properties
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenableclasscaching/" title="-Dcom.ibm.enableClassCaching" class="md-nav__link">
-Dcom.ibm.enableClassCaching
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenablelegacydumpsecurity/" title="-Dcom.ibm.enableLegacyDumpSecurity" class="md-nav__link">
-Dcom.ibm.enableLegacyDumpSecurity
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenablelegacylogsecurity/" title="-Dcom.ibm.enableLegacyLogSecurity" class="md-nav__link">
-Dcom.ibm.enableLegacyLogSecurity
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmenablelegacytracesecurity/" title="-Dcom.ibm.enableLegacyTraceSecurity" class="md-nav__link">
-Dcom.ibm.enableLegacyTraceSecurity
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmgpudisable/" title="-Dcom.ibm.gpu.disable" class="md-nav__link">
-Dcom.ibm.gpu.disable
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmgpuenable/" title="-Dcom.ibm.gpu.enable" class="md-nav__link">
-Dcom.ibm.gpu.enable
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmgpuverbose/" title="-Dcom.ibm.gpu.verbose" class="md-nav__link">
-Dcom.ibm.gpu.verbose
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmlangmanagementosmxbeaniscputime100ns/" title="-Dcom.ibm.lang.management.OperatingSystemMXBean.isCpuTime100ns" class="md-nav__link">
-Dcom.ibm.lang.management.OperatingSystemMXBean.isCpuTime100ns
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmlangmanagementverbose/" title="-Dcom.ibm.lang.management.verbose" class="md-nav__link">
-Dcom.ibm.lang.management.verbose
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachdirectory/" title="-Dcom.ibm.tools.attach.directory" class="md-nav__link">
-Dcom.ibm.tools.attach.directory
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachdisplayname/" title="-Dcom.ibm.tools.attach.displayName" class="md-nav__link">
-Dcom.ibm.tools.attach.displayName
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachenable/" title="-Dcom.ibm.tools.attach.enable" class="md-nav__link">
-Dcom.ibm.tools.attach.enable
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachid/" title="-Dcom.ibm.tools.attach.id" class="md-nav__link">
-Dcom.ibm.tools.attach.id
</a>
</li>
<li class="md-nav__item">
<a href="../dcomibmtoolsattachtimeout/" title="-Dcom.ibm.tools.attach.timeout" class="md-nav__link">
-Dcom.ibm.tools.attach.timeout
</a>
</li>
<li class="md-nav__item">
<a href="../dfileencoding/" title="-Dfile.encoding" class="md-nav__link">
-Dfile.encoding
</a>
</li>
<li class="md-nav__item">
<a href="../djavacompiler/" title="-Djava.compiler" class="md-nav__link">
-Djava.compiler
</a>
</li>
<li class="md-nav__item">
<a href="../djavalangstringsubstringnocopy/" title="-Djava.lang.string.substring.nocopy" class="md-nav__link">
-Djava.lang.string.substring.nocopy
</a>
</li>
<li class="md-nav__item">
<a href="../djavalangstringbuffergrowaggressively/" title="-Djava.lang.stringBuffer.growAggressively" class="md-nav__link">
-Djava.lang.stringBuffer.growAggressively
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativecbc/" title="-Djdk.nativeCBC" class="md-nav__link">
-Djdk.nativeCBC
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativechacha20/" title="-Djdk.nativeChaCha20" class="md-nav__link">
-Djdk.nativeChaCha20
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativecrypto/" title="-Djdk.nativeCrypto" class="md-nav__link">
-Djdk.nativeCrypto
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativedigest/" title="-Djdk.nativeDigest" class="md-nav__link">
-Djdk.nativeDigest
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativegcm/" title="-Djdk.nativeGCM" class="md-nav__link">
-Djdk.nativeGCM
</a>
</li>
<li class="md-nav__item">
<a href="../djdknativersa/" title="-Djdk.nativeRSA" class="md-nav__link">
-Djdk.nativeRSA
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12-5" type="checkbox" id="nav-12-5" checked>
<label class="md-nav__link" for="nav-12-5">
JVM -X options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-12-5">
JVM -X options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../x_jvm_commands/" title="Using -X options" class="md-nav__link">
Using -X options
</a>
</li>
<li class="md-nav__item">
<a href="../x/" title="-X" class="md-nav__link">
-X
</a>
</li>
<li class="md-nav__item">
<a href="../xaggressive/" title="-Xaggressive" class="md-nav__link">
-Xaggressive
</a>
</li>
<li class="md-nav__item">
<a href="../xalwaysclassgc/" title="-Xalwaysclassgc" class="md-nav__link">
-Xalwaysclassgc
</a>
</li>
<li class="md-nav__item">
<a href="../xaot/" title="-Xaot" class="md-nav__link">
-Xaot
</a>
</li>
<li class="md-nav__item">
<a href="../xargencoding/" title="-Xargencoding" class="md-nav__link">
-Xargencoding
</a>
</li>
<li class="md-nav__item">
<a href="../xbootclasspath/" title="-Xbootclasspath" class="md-nav__link">
-Xbootclasspath
</a>
</li>
<li class="md-nav__item">
<a href="../xceehdlr/" title="-XCEEHDLR" class="md-nav__link">
-XCEEHDLR
</a>
</li>
<li class="md-nav__item">
<a href="../xcheck/" title="-Xcheck" class="md-nav__link">
-Xcheck
</a>
</li>
<li class="md-nav__item">
<a href="../xclassgc/" title="-Xclassgc" class="md-nav__link">
-Xclassgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcodecache/" title="-Xcodecache" class="md-nav__link">
-Xcodecache
</a>
</li>
<li class="md-nav__item">
<a href="../xcodecachetotal/" title="-Xcodecachetotal" class="md-nav__link">
-Xcodecachetotal
</a>
</li>
<li class="md-nav__item">
<a href="../xcomp/" title="-Xcomp" class="md-nav__link">
-Xcomp
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactexplicitgc/" title="-Xcompactexplicitgc" class="md-nav__link">
-Xcompactexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactgc/" title="-Xcompactgc" class="md-nav__link">
-Xcompactgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompilationthreads/" title="-XcompilationThreads" class="md-nav__link">
-XcompilationThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xcompressedrefs/" title="-Xcompressedrefs" class="md-nav__link">
-Xcompressedrefs
</a>
</li>
<li class="md-nav__item">
<a href="../xconcurrentbackground/" title="-Xconcurrentbackground" class="md-nav__link">
-Xconcurrentbackground
</a>
</li>
<li class="md-nav__item">
<a href="../xconcurrentlevel/" title="-Xconcurrentlevel" class="md-nav__link">
-Xconcurrentlevel
</a>
</li>
<li class="md-nav__item">
<a href="../xconcurrentslack/" title="-Xconcurrentslack" class="md-nav__link">
-Xconcurrentslack
</a>
</li>
<li class="md-nav__item">
<a href="../xconmeter/" title="-Xconmeter" class="md-nav__link">
-Xconmeter
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexcessivegc/" title="-Xdisableexcessivegc" class="md-nav__link">
-Xdisableexcessivegc
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexplicitgc/" title="-Xdisableexplicitgc" class="md-nav__link">
-Xdisableexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xdisablejavadump/" title="-Xdisablejavadump" class="md-nav__link">
-Xdisablejavadump
</a>
</li>
<li class="md-nav__item">
<a href="../xenablestringconstantgc/" title="-Xdisablestringconstantgc" class="md-nav__link">
-Xdisablestringconstantgc
</a>
</li>
<li class="md-nav__item">
<a href="../xdump/" title="-Xdump" class="md-nav__link">
-Xdump
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexcessivegc/" title="-Xenableexcessivegc" class="md-nav__link">
-Xenableexcessivegc
</a>
</li>
<li class="md-nav__item">
<a href="../xenableexplicitgc/" title="-Xenableexplicitgc" class="md-nav__link">
-Xenableexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xenablestringconstantgc/" title="-Xenablestringconstantgc" class="md-nav__link">
-Xenablestringconstantgc
</a>
</li>
<li class="md-nav__item">
<a href="../xfastresolve/" title="-Xfastresolve" class="md-nav__link">
-Xfastresolve
</a>
</li>
<li class="md-nav__item">
<a href="../xfuture/" title="-Xfuture" class="md-nav__link">
-Xfuture
</a>
</li>
<li class="md-nav__item">
<a href="../xgc/" title="-Xgc" class="md-nav__link">
-Xgc
</a>
</li>
<li class="md-nav__item">
<a href="../xgcsplitheap/" title="-Xgc:splitheap" class="md-nav__link">
-Xgc:splitheap
</a>
</li>
<li class="md-nav__item">
<a href="../xgcpolicy/" title="-Xgcpolicy" class="md-nav__link">
-Xgcpolicy
</a>
</li>
<li class="md-nav__item">
<a href="../xgcthreads/" title="-Xgcthreads" class="md-nav__link">
-Xgcthreads
</a>
</li>
<li class="md-nav__item">
<a href="../xgcworkpackets/" title="-Xgcworkpackets" class="md-nav__link">
-Xgcworkpackets
</a>
</li>
<li class="md-nav__item">
<a href="../xifa/" title="-Xifa" class="md-nav__link">
-Xifa
</a>
</li>
<li class="md-nav__item">
<a href="../xint/" title="-Xint" class="md-nav__link">
-Xint
</a>
</li>
<li class="md-nav__item">
<a href="../xss/" title="-Xiss" class="md-nav__link">
-Xiss
</a>
</li>
<li class="md-nav__item">
<a href="../xjit/" title="-Xjit" class="md-nav__link">
-Xjit
</a>
</li>
<li class="md-nav__item">
<a href="../xjni/" title="-Xjni" class="md-nav__link">
-Xjni
</a>
</li>
<li class="md-nav__item">
<a href="../xlinenumbers/" title="-Xlinenumbers" class="md-nav__link">
-Xlinenumbers
</a>
</li>
<li class="md-nav__item">
<a href="../xloa/" title="-Xloa" class="md-nav__link">
-Xloa
</a>
</li>
<li class="md-nav__item">
<a href="../xloaminimum/" title="-Xloainitial" class="md-nav__link">
-Xloainitial
</a>
</li>
<li class="md-nav__item">
<a href="../xloaminimum/" title="-Xloamaximum" class="md-nav__link">
-Xloamaximum
</a>
</li>
<li class="md-nav__item">
<a href="../xloaminimum/" title="-Xloaminimum" class="md-nav__link">
-Xloaminimum
</a>
</li>
<li class="md-nav__item">
<a href="../xlockreservation/" title="-XlockReservation" class="md-nav__link">
-XlockReservation
</a>
</li>
<li class="md-nav__item">
<a href="../xlockword/" title="-Xlockword" class="md-nav__link">
-Xlockword
</a>
</li>
<li class="md-nav__item">
<a href="../xlog/" title="-Xlog" class="md-nav__link">
-Xlog
</a>
</li>
<li class="md-nav__item">
<a href="../xlp/" title="-Xlp" class="md-nav__link">
-Xlp
</a>
</li>
<li class="md-nav__item">
<a href="../xlpcodecache/" title="-Xlp:codecache" class="md-nav__link">
-Xlp:codecache
</a>
</li>
<li class="md-nav__item">
<a href="../xlpobjectheap/" title="-Xlp:objectheap" class="md-nav__link">
-Xlp:objectheap
</a>
</li>
<li class="md-nav__item">
<a href="../xmine/" title="-Xmaxe" class="md-nav__link">
-Xmaxe
</a>
</li>
<li class="md-nav__item">
<a href="../xminf/" title="-Xmaxf" class="md-nav__link">
-Xmaxf
</a>
</li>
<li class="md-nav__item">
<a href="../xmint/" title="-Xmaxt" class="md-nav__link">
-Xmaxt
</a>
</li>
<li class="md-nav__item">
<a href="../xmca/" title="-Xmca" class="md-nav__link">
-Xmca
</a>
</li>
<li class="md-nav__item">
<a href="../xmca/" title="-Xmco" class="md-nav__link">
-Xmco
</a>
</li>
<li class="md-nav__item">
<a href="../xmcrs/" title="-Xmcrs" class="md-nav__link">
-Xmcrs
</a>
</li>
<li class="md-nav__item">
<a href="../xmine/" title="-Xmine" class="md-nav__link">
-Xmine
</a>
</li>
<li class="md-nav__item">
<a href="../xminf/" title="-Xminf" class="md-nav__link">
-Xminf
</a>
</li>
<li class="md-nav__item">
<a href="../xmint/" title="-Xmint" class="md-nav__link">
-Xmint
</a>
</li>
<li class="md-nav__item">
<a href="../xmn/" title="-Xmn" class="md-nav__link">
-Xmn
</a>
</li>
<li class="md-nav__item">
<a href="../xmn/" title="-Xmns" class="md-nav__link">
-Xmns
</a>
</li>
<li class="md-nav__item">
<a href="../xmn/" title="-Xmnx" class="md-nav__link">
-Xmnx
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmo" class="md-nav__link">
-Xmo
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmoi" class="md-nav__link">
-Xmoi
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmos" class="md-nav__link">
-Xmos
</a>
</li>
<li class="md-nav__item">
<a href="../xmo/" title="-Xmox" class="md-nav__link">
-Xmox
</a>
</li>
<li class="md-nav__item">
<a href="../xmr/" title="-Xmr" class="md-nav__link">
-Xmr
</a>
</li>
<li class="md-nav__item">
<a href="../xmr/" title="-Xmrx" class="md-nav__link">
-Xmrx
</a>
</li>
<li class="md-nav__item">
<a href="../xms/" title="-Xms" class="md-nav__link">
-Xms
</a>
</li>
<li class="md-nav__item">
<a href="../xmso/" title="-Xmso" class="md-nav__link">
-Xmso
</a>
</li>
<li class="md-nav__item">
<a href="../xms/" title="-Xmx" class="md-nav__link">
-Xmx
</a>
</li>
<li class="md-nav__item">
<a href="../xaot/" title="-Xnoaot" class="md-nav__link">
-Xnoaot
</a>
</li>
<li class="md-nav__item">
<a href="../xclassgc/" title="-Xnoclassgc" class="md-nav__link">
-Xnoclassgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactexplicitgc/" title="-Xnocompactexplicitgc" class="md-nav__link">
-Xnocompactexplicitgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompactgc/" title="-Xnocompactgc" class="md-nav__link">
-Xnocompactgc
</a>
</li>
<li class="md-nav__item">
<a href="../xcompressedrefs/" title="-Xnocompressedrefs" class="md-nav__link">
-Xnocompressedrefs
</a>
</li>
<li class="md-nav__item">
<a href="../xjit/" title="-Xnojit" class="md-nav__link">
-Xnojit
</a>
</li>
<li class="md-nav__item">
<a href="../xlinenumbers/" title="-Xnolinenumbers" class="md-nav__link">
-Xnolinenumbers
</a>
</li>
<li class="md-nav__item">
<a href="../xloa/" title="-Xnoloa" class="md-nav__link">
-Xnoloa
</a>
</li>
<li class="md-nav__item">
<a href="../xsigcatch/" title="-Xnosigcatch" class="md-nav__link">
-Xnosigcatch
</a>
</li>
<li class="md-nav__item">
<a href="../xsigchain/" title="-Xnosigchain" class="md-nav__link">
-Xnosigchain
</a>
</li>
<li class="md-nav__item">
<a href="../xnumanone/" title="-Xnuma:none" class="md-nav__link">
-Xnuma:none
</a>
</li>
<li class="md-nav__item">
<a href="../xoptionsfile/" title="-Xoptionsfile" class="md-nav__link">
-Xoptionsfile
</a>
</li>
<li class="md-nav__item">
<a href="../xquickstart/" title="-Xquickstart" class="md-nav__link">
-Xquickstart
</a>
</li>
<li class="md-nav__item">
<a href="../xrs/" title="-Xrs" class="md-nav__link">
-Xrs
</a>
</li>
<li class="md-nav__item">
<a href="../xsamplingexpirationtime/" title="-XsamplingExpirationTime" class="md-nav__link">
-XsamplingExpirationTime
</a>
</li>
<li class="md-nav__item">
<a href="../xscdmx/" title="-Xscdmx" class="md-nav__link">
-Xscdmx
</a>
</li>
<li class="md-nav__item">
<a href="../xscminaot/" title="-Xscmaxaot" class="md-nav__link">
-Xscmaxaot
</a>
</li>
<li class="md-nav__item">
<a href="../xscminjitdata/" title="-Xscmaxjitdata" class="md-nav__link">
-Xscmaxjitdata
</a>
</li>
<li class="md-nav__item">
<a href="../xscminaot/" title="-Xscminaot" class="md-nav__link">
-Xscminaot
</a>
</li>
<li class="md-nav__item">
<a href="../xscminjitdata/" title="-Xscminjitdata" class="md-nav__link">
-Xscminjitdata
</a>
</li>
<li class="md-nav__item">
<a href="../xscmx/" title="-Xscmx" class="md-nav__link">
-Xscmx
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
-Xshareclasses
</label>
<a href="./" title="-Xshareclasses" class="md-nav__link md-nav__link--active">
-Xshareclasses
</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">On this page ...</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#syntax" class="md-nav__link">
Syntax
</a>
</li>
<li class="md-nav__item">
<a href="#parameters" class="md-nav__link">
Parameters
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#adjustmaxaot-cache-utility" class="md-nav__link">
adjustmaxaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminaot-cache-utility" class="md-nav__link">
adjustminaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustmaxjitdata-cache-utility" class="md-nav__link">
adjustmaxjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminjitdata-cache-utility" class="md-nav__link">
adjustminjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustsoftmx-cache-utility" class="md-nav__link">
adjustsoftmx (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#allowclasspaths" class="md-nav__link">
allowClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#bootclassesonly" class="md-nav__link">
bootClassesOnly
</a>
</li>
<li class="md-nav__item">
<a href="#cachedir" class="md-nav__link">
cacheDir
</a>
</li>
<li class="md-nav__item">
<a href="#cachedirperm" class="md-nav__link">
cacheDirPerm
</a>
</li>
<li class="md-nav__item">
<a href="#cacheretransformed" class="md-nav__link">
cacheRetransformed
</a>
</li>
<li class="md-nav__item">
<a href="#checkurltimestamps" class="md-nav__link">
checkURLTimestamps
</a>
</li>
<li class="md-nav__item">
<a href="#createlayer" class="md-nav__link">
createLayer
</a>
</li>
<li class="md-nav__item">
<a href="#destroy-cache-utility" class="md-nav__link">
destroy (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyall-cache-utility" class="md-nav__link">
destroyAll (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyalllayers" class="md-nav__link">
destroyAllLayers
</a>
</li>
<li class="md-nav__item">
<a href="#destroyallsnapshots-cache-utility" class="md-nav__link">
destroyAllSnapshots (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroysnapshot-cache-utility" class="md-nav__link">
destroySnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#disablebci" class="md-nav__link">
disableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#enablebci" class="md-nav__link">
enableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#expire-cache-utility" class="md-nav__link">
expire (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#fatal" class="md-nav__link">
fatal
</a>
</li>
<li class="md-nav__item">
<a href="#findaotmethods-cache-utility" class="md-nav__link">
findAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#groupaccess" class="md-nav__link">
groupAccess
</a>
</li>
<li class="md-nav__item">
<a href="#help" class="md-nav__link">
help
</a>
</li>
<li class="md-nav__item">
<a href="#invalidateaotmethods-cache-utility" class="md-nav__link">
invalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#layer" class="md-nav__link">
layer
</a>
</li>
<li class="md-nav__item">
<a href="#listallcaches-cache-utility" class="md-nav__link">
listAllCaches (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#mprotect" class="md-nav__link">
mprotect
</a>
</li>
<li class="md-nav__item">
<a href="#modified" class="md-nav__link">
modified
</a>
</li>
<li class="md-nav__item">
<a href="#name" class="md-nav__link">
name
</a>
</li>
<li class="md-nav__item">
<a href="#noaot" class="md-nav__link">
noaot
</a>
</li>
<li class="md-nav__item">
<a href="#nobootclasspath" class="md-nav__link">
noBootclasspath
</a>
</li>
<li class="md-nav__item">
<a href="#notimestampchecks" class="md-nav__link">
noTimestampChecks
</a>
</li>
<li class="md-nav__item">
<a href="#nocheckurltimestamps" class="md-nav__link">
nocheckURLTimestamps
</a>
</li>
<li class="md-nav__item">
<a href="#nojitdata" class="md-nav__link">
nojitdata
</a>
</li>
<li class="md-nav__item">
<a href="#none" class="md-nav__link">
none
</a>
</li>
<li class="md-nav__item">
<a href="#nonfatal" class="md-nav__link">
nonfatal
</a>
</li>
<li class="md-nav__item">
<a href="#nonpersistent" class="md-nav__link">
nonpersistent
</a>
</li>
<li class="md-nav__item">
<a href="#nopersistentdiskspacecheck" class="md-nav__link">
noPersistentDiskSpaceCheck
</a>
</li>
<li class="md-nav__item">
<a href="#persistent" class="md-nav__link">
persistent
</a>
</li>
<li class="md-nav__item">
<a href="#printallstats-cache-utility" class="md-nav__link">
printAllStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#printstats-cache-utility" class="md-nav__link">
printStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#printtoplayerstats-cache-utility" class="md-nav__link">
printTopLayerStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#readonly" class="md-nav__link">
readonly
</a>
</li>
<li class="md-nav__item">
<a href="#reset" class="md-nav__link">
reset
</a>
</li>
<li class="md-nav__item">
<a href="#restorefromsnapshot-cache-utility" class="md-nav__link">
restoreFromSnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#restrictclasspaths" class="md-nav__link">
restrictClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#revalidateaotmethods-cache-utility" class="md-nav__link">
revalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#silent" class="md-nav__link">
silent
</a>
</li>
<li class="md-nav__item">
<a href="#snapshotcache-cache-utility" class="md-nav__link">
snapshotCache (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#utilities" class="md-nav__link">
utilities
</a>
</li>
<li class="md-nav__item">
<a href="#verbose" class="md-nav__link">
verbose
</a>
</li>
<li class="md-nav__item">
<a href="#verboseaot" class="md-nav__link">
verboseAOT
</a>
</li>
<li class="md-nav__item">
<a href="#verbosehelper" class="md-nav__link">
verboseHelper
</a>
</li>
<li class="md-nav__item">
<a href="#verboseio" class="md-nav__link">
verboseIO
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#method-specification-syntax" class="md-nav__link">
Method specification syntax
</a>
</li>
<li class="md-nav__item">
<a href="#see-also" class="md-nav__link">
See also
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../xsigcatch/" title="-Xsigcatch" class="md-nav__link">
-Xsigcatch
</a>
</li>
<li class="md-nav__item">
<a href="../xsigchain/" title="-Xsigchain" class="md-nav__link">
-Xsigchain
</a>
</li>
<li class="md-nav__item">
<a href="../xsignal/" title="-Xsignal" class="md-nav__link">
-Xsignal
</a>
</li>
<li class="md-nav__item">
<a href="../xsoftmx/" title="-Xsoftmx" class="md-nav__link">
-Xsoftmx
</a>
</li>
<li class="md-nav__item">
<a href="../xsoftrefthreshold/" title="-Xsoftrefthreshold" class="md-nav__link">
-Xsoftrefthreshold
</a>
</li>
<li class="md-nav__item">
<a href="../xss/" title="-Xss" class="md-nav__link">
-Xss
</a>
</li>
<li class="md-nav__item">
<a href="../xss/" title="-Xssi" class="md-nav__link">
-Xssi
</a>
</li>
<li class="md-nav__item">
<a href="../xtgc/" title="-Xtgc" class="md-nav__link">
-Xtgc
</a>
</li>
<li class="md-nav__item">
<a href="../xthr/" title="-Xthr" class="md-nav__link">
-Xthr
</a>
</li>
<li class="md-nav__item">
<a href="../xtlhprefetch/" title="-XtlhPrefetch" class="md-nav__link">
-XtlhPrefetch
</a>
</li>
<li class="md-nav__item">
<a href="../xtrace/" title="-Xtrace" class="md-nav__link">
-Xtrace
</a>
</li>
<li class="md-nav__item">
<a href="../xtunevirtualized/" title="-Xtune:virtualized" class="md-nav__link">
-Xtune:virtualized
</a>
</li>
<li class="md-nav__item">
<a href="../xverbosegclog/" title="-Xverbosegclog" class="md-nav__link">
-Xverbosegclog
</a>
</li>
<li class="md-nav__item">
<a href="../xverify/" title="-Xverify" class="md-nav__link">
-Xverify
</a>
</li>
<li class="md-nav__item">
<a href="../xzero/" title="-Xzero" class="md-nav__link">
-Xzero
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-12-6" type="checkbox" id="nav-12-6">
<label class="md-nav__link" for="nav-12-6">
JVM -XX options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-12-6">
JVM -XX options
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../xx_jvm_commands/" title="Using -XX options" class="md-nav__link">
Using -XX options
</a>
</li>
<li class="md-nav__item">
<a href="../xxactiveprocessorcount/" title="-XXActiveProcessorCount" class="md-nav__link">
-XXActiveProcessorCount
</a>
</li>
<li class="md-nav__item">
<a href="../xxallowvmshutdown/" title="-XXallowvmshutdown" class="md-nav__link">
-XXallowvmshutdown
</a>
</li>
<li class="md-nav__item">
<a href="../xxclassrelationshipverifier/" title="-XX:[+|-]ClassRelationshipVerifier" class="md-nav__link">
-XX:[+|-]ClassRelationshipVerifier
</a>
</li>
<li class="md-nav__item">
<a href="../xxconcgcthreads/" title="-XX:ConcGCThreads" class="md-nav__link">
-XX:ConcGCThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xxcodecachetotal/" title="-XX:codecachetotal" class="md-nav__link">
-XX:codecachetotal
</a>
</li>
<li class="md-nav__item">
<a href="../xxcompactstrings/" title="-XX:[+|-]CompactStrings" class="md-nav__link">
-XX:[+|-]CompactStrings
</a>
</li>
<li class="md-nav__item">
<a href="../xxdisableexplicitgc/" title="-XX:[+|-]DisableExplicitGC" class="md-nav__link">
-XX:[+|-]DisableExplicitGC
</a>
</li>
<li class="md-nav__item">
<a href="../xxdisclaimjitscratch/" title="-XX:[+|-]DisclaimJitScratch" class="md-nav__link">
-XX:[+|-]DisclaimJitScratch
</a>
</li>
<li class="md-nav__item">
<a href="../xxenablecpumonitor/" title="-XX:[+|-]EnableCPUMonitor" class="md-nav__link">
-XX:[+|-]EnableCPUMonitor
</a>
</li>
<li class="md-nav__item">
<a href="../xxexitonoutofmemoryerror/" title="-XX:[+|-]ExitOnOutOfMemoryError" class="md-nav__link">
-XX:[+|-]ExitOnOutOfMemoryError
</a>
</li>
<li class="md-nav__item">
<a href="../xxhandlesigxfsz/" title="-XX:[+|-]handleSIGXFSZ" class="md-nav__link">
-XX:[+|-]handleSIGXFSZ
</a>
</li>
<li class="md-nav__item">
<a href="../xxheapdumponoutofmemory/" title="-XX:[+|-]HeapDumpOnOutOfMemory" class="md-nav__link">
-XX:[+|-]HeapDumpOnOutOfMemory
</a>
</li>
<li class="md-nav__item">
<a href="../xxheapdumppath/" title="-XX:HeapDumpPath" class="md-nav__link">
-XX:HeapDumpPath
</a>
</li>
<li class="md-nav__item">
<a href="../xxheapmanagementmxbeancompatibility/" title="-XX:[+|-]HeapManagementMXBeanCompatibility" class="md-nav__link">
-XX:[+|-]HeapManagementMXBeanCompatibility
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuningcompactonidle/" title="-XX:[+|-]IdleTuningCompactOnIdle" class="md-nav__link">
-XX:[+|-]IdleTuningCompactOnIdle
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuninggconidle/" title="-XX:[+|-]IdleTuningGcOnIdle" class="md-nav__link">
-XX:[+|-]IdleTuningGcOnIdle
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuningminfreeheaponidle/" title="-XX:IdleTuningMinFreeHeapOnIdle" class="md-nav__link">
-XX:IdleTuningMinFreeHeapOnIdle
</a>
</li>
<li class="md-nav__item">
<a href="../xxidletuningminidlewaittime/" title="-XX:IdleTuningMinIdleWaitTime" class="md-nav__link">
-XX:IdleTuningMinIdleWaitTime
</a>
</li>
<li class="md-nav__item">
<a href="../xxignoreunrecognizedvmoptions/" title="-XX:[+|-]IgnoreUnrecognizedVMOptions" class="md-nav__link">
-XX:[+|-]IgnoreUnrecognizedVMOptions
</a>
</li>
<li class="md-nav__item">
<a href="../xxignoreunrecognizedxxcolonoptions/" title="-XX:[+|-]IgnoreUnrecognizedXXColonOptions" class="md-nav__link">
-XX:[+|-]IgnoreUnrecognizedXXColonOptions
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialrampercentage/" title="-XX:InitialRAMPercentage" class="md-nav__link">
-XX:InitialRAMPercentage
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialheapsize/" title="-XX:InitialHeapSize" class="md-nav__link">
-XX:InitialHeapSize
</a>
</li>
<li class="md-nav__item">
<a href="../xxinterleavememory/" title="-XX:[+|-]InterleaveMemory" class="md-nav__link">
-XX:[+|-]InterleaveMemory
</a>
</li>
<li class="md-nav__item">
<a href="../xxjitinlinewatches/" title="-XX:[+|-]JITInlineWatches" class="md-nav__link">
-XX:[+|-]JITInlineWatches
</a>
</li>
<li class="md-nav__item">
<a href="../xxlazysymbolresolution/" title="-XX:[+|-]LazySymbolResolution" class="md-nav__link">
-XX:[+|-]LazySymbolResolution
</a>
</li>
<li class="md-nav__item">
<a href="../xxmaxdirectmemorysize/" title="-XX:MaxDirectMemorySize" class="md-nav__link">
-XX:MaxDirectMemorySize
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialheapsize/" title="-XX:MaxHeapSize" class="md-nav__link">
-XX:MaxHeapSize
</a>
</li>
<li class="md-nav__item">
<a href="../xxinitialrampercentage/" title="-XX:MaxRAMPercentage" class="md-nav__link">
-XX:MaxRAMPercentage
</a>
</li>
<li class="md-nav__item">
<a href="../xxonoutofmemoryerror/" title="-XX:OnOutOfMemoryError" class="md-nav__link">
-XX:OnOutOfMemoryError
</a>
</li>
<li class="md-nav__item">
<a href="../xxnosuballoc32bitmem/" title="-XXnosuballoc32bitmem" class="md-nav__link">
-XXnosuballoc32bitmem
</a>
</li>
<li class="md-nav__item">
<a href="../xxpagealigndirectmemory/" title="-XX:[+|-]PageAlignDirectMemory" class="md-nav__link">
-XX:[+|-]PageAlignDirectMemory
</a>
</li>
<li class="md-nav__item">
<a href="../xxparallelcmsthreads/" title="-XX:ParallelCMSThreads" class="md-nav__link">
-XX:ParallelCMSThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xxparallelgcthreads/" title="-XX:ParallelGCThreads" class="md-nav__link">
-XX:ParallelGCThreads
</a>
</li>
<li class="md-nav__item">
<a href="../xxpositiveidentityhash/" title="-XX:[+|-]PositiveIdentityHash" class="md-nav__link">
-XX:[+|-]PositiveIdentityHash
</a>
</li>
<li class="md-nav__item">
<a href="../xxprintcodecache/" title="-XX:[+|-]PrintCodeCache" class="md-nav__link">
-XX:[+|-]PrintCodeCache
</a>
</li>
<li class="md-nav__item">
<a href="../xxreadipinfoforras/" title="-XX:[+|-]ReadIPInfoForRAS" class="md-nav__link">
-XX:[+|-]ReadIPInfoForRAS
</a>
</li>
<li class="md-nav__item">
<a href="../xxreducecpumonitoroverhead/" title="-XX:[+|-]ReduceCPUMonitorOverhead" class="md-nav__link">
-XX:[+|-]ReduceCPUMonitorOverhead
</a>
</li>
<li class="md-nav__item">
<a href="../xxruntimeinstrumentation/" title="-XX:[+|-]RuntimeInstrumentation" class="md-nav__link">
-XX:[+|-]RuntimeInstrumentation
</a>
</li>
<li class="md-nav__item">
<a href="../xxsethwprefetch/" title="-XXsetHWPrefetch" class="md-nav__link">
-XXsetHWPrefetch
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareanonymousclasses/" title="-XX:[+|-]ShareAnonymousClasses" class="md-nav__link">
-XX:[+|-]ShareAnonymousClasses
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareclassesenablebci/" title="-XX:ShareClassesDisableBCI" class="md-nav__link">
-XX:ShareClassesDisableBCI
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareclassesenablebci/" title="-XX:ShareClassesEnableBCI" class="md-nav__link">
-XX:ShareClassesEnableBCI
</a>
</li>
<li class="md-nav__item">
<a href="../xxsharedcachehardlimit/" title="-XX:SharedCacheHardLimit" class="md-nav__link">
-XX:SharedCacheHardLimit
</a>
</li>
<li class="md-nav__item">
<a href="../xxshareunsafeclasses/" title="-XX:[+|-]ShareUnsafeClasses" class="md-nav__link">
-XX:[+|-]ShareUnsafeClasses
</a>
</li>
<li class="md-nav__item">
<a href="../xxstacktraceinthrowable/" title="-XX:-StackTraceInThrowable" class="md-nav__link">
-XX:-StackTraceInThrowable
</a>
</li>
<li class="md-nav__item">
<a href="../xxtransparenthugepage/" title="-XX:[+|-]TransparentHugePage" class="md-nav__link">
-XX:[+|-]TransparentHugePage
</a>
</li>
<li class="md-nav__item">
<a href="../xxusecompressedoops/" title="-XX:[+|-]UseCompressedOops" class="md-nav__link">
-XX:[+|-]UseCompressedOops
</a>
</li>
<li class="md-nav__item">
<a href="../xxusecontainersupport/" title="-XX:[+|-]UseContainerSupport" class="md-nav__link">
-XX:[+|-]UseContainerSupport
</a>
</li>
<li class="md-nav__item">
<a href="../xxusegcstartuphints/" title="-XX:[+|-]UseGCStartupHints" class="md-nav__link">
-XX:[+|-]UseGCStartupHints
</a>
</li>
<li class="md-nav__item">
<a href="../xxusenogc/" title="-XX:[+|-]UseNoGC" class="md-nav__link">
-XX:[+|-]UseNoGC
</a>
</li>
<li class="md-nav__item">
<a href="../xxverboseverification/" title="-XX:[+|-]VerboseVerification" class="md-nav__link">
-XX:[+|-]VerboseVerification
</a>
</li>
<li class="md-nav__item">
<a href="../xxvmlockclassloader/" title="-XX:[+|-]VMLockClassLoader" class="md-nav__link">
-XX:[+|-]VMLockClassLoader
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-13" type="checkbox" id="nav-13">
<label class="md-nav__link" for="nav-13">
Reference
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-13">
Reference
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../openj9_support/" title="Supported environments" class="md-nav__link">
Supported environments
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_defaults/" title="Default settings" class="md-nav__link">
Default settings
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_signals/" title="Signal handling" class="md-nav__link">
Signal handling
</a>
</li>
<li class="md-nav__item">
<a href="../openj9_directories/" title="Directory conventions" class="md-nav__link">
Directory conventions
</a>
</li>
<li class="md-nav__item">
<a href="../messages_intro/" title="OpenJ9 messages" class="md-nav__link">
OpenJ9 messages
</a>
</li>
<li class="md-nav__item">
<a href="../env_var/" title="Environment variables" class="md-nav__link">
Environment variables
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../legal/" title="Legal" class="md-nav__link">
Legal
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">On this page ...</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#syntax" class="md-nav__link">
Syntax
</a>
</li>
<li class="md-nav__item">
<a href="#parameters" class="md-nav__link">
Parameters
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#adjustmaxaot-cache-utility" class="md-nav__link">
adjustmaxaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminaot-cache-utility" class="md-nav__link">
adjustminaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustmaxjitdata-cache-utility" class="md-nav__link">
adjustmaxjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminjitdata-cache-utility" class="md-nav__link">
adjustminjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustsoftmx-cache-utility" class="md-nav__link">
adjustsoftmx (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#allowclasspaths" class="md-nav__link">
allowClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#bootclassesonly" class="md-nav__link">
bootClassesOnly
</a>
</li>
<li class="md-nav__item">
<a href="#cachedir" class="md-nav__link">
cacheDir
</a>
</li>
<li class="md-nav__item">
<a href="#cachedirperm" class="md-nav__link">
cacheDirPerm
</a>
</li>
<li class="md-nav__item">
<a href="#cacheretransformed" class="md-nav__link">
cacheRetransformed
</a>
</li>
<li class="md-nav__item">
<a href="#checkurltimestamps" class="md-nav__link">
checkURLTimestamps
</a>
</li>
<li class="md-nav__item">
<a href="#createlayer" class="md-nav__link">
createLayer
</a>
</li>
<li class="md-nav__item">
<a href="#destroy-cache-utility" class="md-nav__link">
destroy (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyall-cache-utility" class="md-nav__link">
destroyAll (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyalllayers" class="md-nav__link">
destroyAllLayers
</a>
</li>
<li class="md-nav__item">
<a href="#destroyallsnapshots-cache-utility" class="md-nav__link">
destroyAllSnapshots (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroysnapshot-cache-utility" class="md-nav__link">
destroySnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#disablebci" class="md-nav__link">
disableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#enablebci" class="md-nav__link">
enableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#expire-cache-utility" class="md-nav__link">
expire (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#fatal" class="md-nav__link">
fatal
</a>
</li>
<li class="md-nav__item">
<a href="#findaotmethods-cache-utility" class="md-nav__link">
findAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#groupaccess" class="md-nav__link">
groupAccess
</a>
</li>
<li class="md-nav__item">
<a href="#help" class="md-nav__link">
help
</a>
</li>
<li class="md-nav__item">
<a href="#invalidateaotmethods-cache-utility" class="md-nav__link">
invalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#layer" class="md-nav__link">
layer
</a>
</li>
<li class="md-nav__item">
<a href="#listallcaches-cache-utility" class="md-nav__link">
listAllCaches (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#mprotect" class="md-nav__link">
mprotect
</a>
</li>
<li class="md-nav__item">
<a href="#modified" class="md-nav__link">
modified
</a>
</li>
<li class="md-nav__item">
<a href="#name" class="md-nav__link">
name
</a>
</li>
<li class="md-nav__item">
<a href="#noaot" class="md-nav__link">
noaot
</a>
</li>
<li class="md-nav__item">
<a href="#nobootclasspath" class="md-nav__link">
noBootclasspath
</a>
</li>
<li class="md-nav__item">
<a href="#notimestampchecks" class="md-nav__link">
noTimestampChecks
</a>
</li>
<li class="md-nav__item">
<a href="#nocheckurltimestamps" class="md-nav__link">
nocheckURLTimestamps
</a>
</li>
<li class="md-nav__item">
<a href="#nojitdata" class="md-nav__link">
nojitdata
</a>
</li>
<li class="md-nav__item">
<a href="#none" class="md-nav__link">
none
</a>
</li>
<li class="md-nav__item">
<a href="#nonfatal" class="md-nav__link">
nonfatal
</a>
</li>
<li class="md-nav__item">
<a href="#nonpersistent" class="md-nav__link">
nonpersistent
</a>
</li>
<li class="md-nav__item">
<a href="#nopersistentdiskspacecheck" class="md-nav__link">
noPersistentDiskSpaceCheck
</a>
</li>
<li class="md-nav__item">
<a href="#persistent" class="md-nav__link">
persistent
</a>
</li>
<li class="md-nav__item">
<a href="#printallstats-cache-utility" class="md-nav__link">
printAllStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#printstats-cache-utility" class="md-nav__link">
printStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#printtoplayerstats-cache-utility" class="md-nav__link">
printTopLayerStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#readonly" class="md-nav__link">
readonly
</a>
</li>
<li class="md-nav__item">
<a href="#reset" class="md-nav__link">
reset
</a>
</li>
<li class="md-nav__item">
<a href="#restorefromsnapshot-cache-utility" class="md-nav__link">
restoreFromSnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#restrictclasspaths" class="md-nav__link">
restrictClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#revalidateaotmethods-cache-utility" class="md-nav__link">
revalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#silent" class="md-nav__link">
silent
</a>
</li>
<li class="md-nav__item">
<a href="#snapshotcache-cache-utility" class="md-nav__link">
snapshotCache (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#utilities" class="md-nav__link">
utilities
</a>
</li>
<li class="md-nav__item">
<a href="#verbose" class="md-nav__link">
verbose
</a>
</li>
<li class="md-nav__item">
<a href="#verboseaot" class="md-nav__link">
verboseAOT
</a>
</li>
<li class="md-nav__item">
<a href="#verbosehelper" class="md-nav__link">
verboseHelper
</a>
</li>
<li class="md-nav__item">
<a href="#verboseio" class="md-nav__link">
verboseIO
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#method-specification-syntax" class="md-nav__link">
Method specification syntax
</a>
</li>
<li class="md-nav__item">
<a href="#see-also" class="md-nav__link">
See also
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<!-- this adds 'pencil' icon to H1 so that you can edit the page directly in GitHub
<a href="https://github.com/eclipse/openj9-docs/edit/master/docs/xshareclasses.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
-->
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<h1 id="-xshareclasses">-Xshareclasses</h1>
<p>Use the <code>-Xshareclasses</code> option to enable, disable, or modify class sharing behavior. Class data sharing is enabled by default for bootstrap classes only (the equivalent of specifying <code>-Xshareclasses:bootClassesOnly,nonFatal,silent</code>), unless your application is running in a container.</p>
<p>This option can take a number of parameters, some of which are cache utilities. Cache utilities perform the required operation on the specified cache, without starting the VM. You can combine multiple suboptions, which are separated by commas, but the cache utilities are mutually exclusive.</p>
<p>When you are running cache utilities, the message <code>Could not create the Java virtual machine</code> is expected. Cache utilities do not create the virtual machine.</p>
<p>Some cache utilities can work with caches from previous Java&trade; versions or caches that are created by virtual machines (VMs) with different bit-widths. These caches are referred to as <em>"incompatible"</em> caches.</p>
<p>See also the <a href="../shrc/">Class data sharing</a> topic, which includes some <a href="../shrc/#best-practices-for-using-xshareclasses">best practices for using <code>-Xshareclasses</code></a>.</p>
<h2 id="syntax">Syntax</h2>
<pre><code> -Xshareclasses:&lt;parameter&gt;
</code></pre>
<p>When you specify <code>-Xshareclasses</code> without any parameters and without specifying either the <code>-Xscmx</code> or <code>-XX:SharedCacheHardLimit</code> options, a shared classes cache is created with a default size, as follows:</p>
<ul>
<li>For 64-bit platforms, the default size is 300 MB, with a "soft" maximum limit for the initial size of the cache (<code>-Xscmx</code>) of 64MB, with the following exceptions:<ul>
<li>For a persistent cache, if the free disk space is less than 6 GB, the default size is set to 64 MB and an <code>-Xscmx</code> size is not set.</li>
<li>For a non-persistent cache on Linux&reg; or macOS&reg; systems, the cache size is limited by the maximum amount of memory that can be reserved by a process (<code>SHMMAX</code>). If <code>SHMMAX</code> is less than 300MB, the default shared cache size is set to equal <code>SHMMAX</code>. If <code>SHMMAX</code> is greater than 80 MB, <code>-Xscmx</code> is set to 64 MB. If <code>SHMMAX</code> is less than 80MB an <code>-Xscmx</code> size is not set.</li>
</ul>
</li>
<li>For other platforms, the default size is 16MB.</li>
</ul>
<h2 id="parameters">Parameters</h2>
<h3 id="adjustmaxaot-cache-utility"><code>adjustmaxaot</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:adjustmaxaot=&lt;size&gt;
</code></pre>
<dl>
<dd>Adjusts the maximum shared classes cache space that is allowed for AOT data. When you use the <code>-Xshareclasses:verbose</code> option, the VM writes to the console the number of bytes that are not stored due to the current setting of the <a href="../xscminaot/" title="When you create a shared classes cache, you can use this option to apply a maximum number of bytes in the class cache that can be used for AOT data."><code>-Xscmaxaot</code></a> option.</dd>
</dl>
<h3 id="adjustminaot-cache-utility"><code>adjustminaot</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:adjustminaot=&lt;size&gt;
</code></pre>
<dl>
<dd>Adjusts the minimum shared classes cache space that is reserved for AOT data. Use the <a href="../xscminaot/" title="When you create a shared classes cache, you can use this option to apply a minimum number of bytes in the class cache to reserve for AOT data."><code>-Xscminaot</code></a> option to set the initial minimum size.</dd>
</dl>
<h3 id="adjustmaxjitdata-cache-utility"><code>adjustmaxjitdata</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:adjustmaxjitdata=&lt;size&gt;
</code></pre>
<dl>
<dd>Adjusts the maximum shared classes cache space that is allowed for JIT data. When you use the <code>-Xshareclasses:verbose</code> option, the VM writes to the console the number of bytes that are not stored due to the current setting of the <a href="../xscminjitdata/" title="When you create a shared classes cache, you can use this option to apply a maximum number of bytes in the class cache that can be used for JIT data."><code>-Xscmaxjitdata</code></a> option.</dd>
</dl>
<h3 id="adjustminjitdata-cache-utility"><code>adjustminjitdata</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:adjustminjitdata=&lt;size&gt;
</code></pre>
<dl>
<dd>Adjusts the minimum shared classes cache space that is reserved for JIT data. Use the <a href="../xscminjitdata/" title="When you create a shared classes cache, you can use this option to apply a minimum number of bytes in the class cache to reserve for JIT data."><code>-Xscminjitdata</code></a> option to set the initial minimum size.</dd>
</dl>
<h3 id="adjustsoftmx-cache-utility"><code>adjustsoftmx</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:adjustsoftmx=&lt;size&gt;
</code></pre>
<dl>
<dd>Adjusts the soft maximum size of the cache. When you use the <code>-Xshareclasses:verbose</code> option, the VM writes to the console the number of bytes that are not stored due to the current setting of the soft maximum size. For more information about the soft maximum size, see <a href="../xscmx/" title="For a new shared class cache, specifies either the actual size of the cache (if the -XX:SharedCacheHardLimit option is not present) or the soft maximum size of the cache (if used with the -XX:SharedCacheHardLimit option).">-Xscmx</a>.</dd>
</dl>
<h3 id="allowclasspaths"><code>allowClasspaths</code></h3>
<pre><code> -Xshareclasses:allowClasspaths
</code></pre>
<dl>
<dd>Allows a VM to store classpaths into an existing shared cache that was created by using the <code>restrictClasspaths</code> option.</dd>
</dl>
<h3 id="bootclassesonly"><code>bootClassesOnly</code></h3>
<pre><code> -Xshareclasses:bootClassesOnly
</code></pre>
<dl>
<dd>Disables caching of classes that are loaded by class loaders other than the bootstrap class loader. If you use this suboption, the <code>nonfatal</code> suboption is also set, so this suboption is the equivalent of specifying <code>-Xshareclasses:bootClassesOnly,nonfatal</code>.</dd>
</dl>
<h3 id="cachedir"><code>cacheDir</code></h3>
<pre><code> -Xshareclasses:cacheDir=&lt;directory&gt;
</code></pre>
<dl>
<dd>
<p>Sets the directory in which cache data is read and written. The following defaults apply:</p>
<ul>
<li>On Windows&trade; systems, <code>&lt;directory&gt;</code> is the user's <code>C:\Documents and Settings\&lt;username&gt;\Local Settings\Application Data\javasharedresources</code> directory.</li>
<li>On other operating systems, <code>&lt;directory&gt;</code> is the user's home directory, unless the <code>groupAccess</code> parameter is specified, in which case it is <code>/tmp/javasharedresources</code>, because some members of the group might not have access to the user's home directory. You must have sufficient permissions in <code>&lt;directory&gt;</code>.</li>
</ul>
</dd>
<dd>
<p>On AIX&reg;, Linux, macOS, and Windows systems, the VM writes persistent cache files directly into the directory specified. Persistent cache files can be safely moved and deleted from the file system. For persistent caches, the directory must not be on an NFS mount.</p>
</dd>
<dd>
<p>Nonpersistent caches are stored in shared memory and have control files that describe the location of the memory. Control files are stored in a <code>javasharedresources</code> subdirectory of the <code>cacheDir</code> specified. Do not move or delete control files in this directory. The <code>listAllCaches</code> utility, the <code>destroyAll</code> utility, and the <code>expire</code> suboption work only in the scope of a given <code>cacheDir</code>.</p>
</dd>
<dd>
<p>On AIX, Linux, and macOS systems, if you specify the <code>cacheDir=&lt;directory&gt;</code> option, persistent caches are created with the following permissions (<code>-rw-r--r--</code>):</p>
<ul>
<li>User: read/write</li>
<li>Group: read (read/write if you also specify <code>-Xshareclasses:groupAccess</code>)</li>
<li>Other: read only</li>
</ul>
</dd>
<dd>
<p>Otherwise, persistent caches are created with the same permissions as non-persistent caches. The permissions for non-persistent caches are <code>-rw-r-----</code>, or <code>-rw-rw----</code> if you also specify <code>-Xshareclasses:groupAccess</code>.</p>
</dd>
<dd>
<p><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> It is good practice to set an application-specific cache directory to avoid sharing the default cache directory with the default cache, or other application caches that don't set a cache directory, and means that your application is therefore unaffected by a user running <a href="./#destroyall-cache-utility"><code>java -Xshareclasses:destroyAll</code></a>. See <a href="../shrc/#best-practices-for-using-xshareclasses">Class data sharing: Best practices for using <code>-Xshareclasses</code></a>.</p>
</dd>
</dl>
<h3 id="cachedirperm"><code>cacheDirPerm</code></h3>
<dl>
<dd><strong>(Not Windows)</strong><pre><code>-Xshareclasses:cacheDirPerm=&lt;permission&gt;
</code></pre>
</dd>
<dd>
<p>Sets Unix-style permissions when you are creating a cache directory. <code>&lt;permission&gt;</code> must be an octal number in the ranges 0700 - 0777 or 1700 - 1777. If <code>&lt;permission&gt;</code> is not valid, the VM ends with an appropriate error message.</p>
</dd>
<dd>
<p>The permissions that are specified by this suboption are used only when you are creating a new cache directory. If the cache directory already exists, this suboption is ignored and the cache directory permissions are not changed.</p>
</dd>
<dd>
<p>If you set this suboption to 0000, the default directory permissions are used. If you set this suboption to 1000, the machine default directory permissions are used, but the sticky bit is enabled.</p>
</dd>
<dd>
<p>If the cache directory is the platform default directory, <code>/tmp/javasharedresources</code>, this suboption is ignored and the cache directory permissions are set to 0777.</p>
</dd>
<dd>
<p>If you do not set this suboption, the default permissions are used according to the following conditions:</p>
</dd>
</dl>
<table>
<thead>
<tr>
<th>Condition</th>
<th>Permissions</th>
</tr>
</thead>
<tbody>
<tr>
<td>The cache directory is <code>/tmp/javasharedresources</code>. If this directory already exists with different permissions, the permissions are changed when the cache is opened.†</td>
<td>0777</td>
</tr>
<tr>
<td>The cache directory is a new directory and you also specify the <code>groupAcess</code> suboption</td>
<td>0770</td>
</tr>
<tr>
<td>The cache directory is a new directory and you do not specify the <code>groupAccess</code> suboption</td>
<td>0700</td>
</tr>
<tr>
<td>The cache directory already exists and is not <code>/tmp/javasharedresources</code></td>
<td>Unchanged</td>
</tr>
</tbody>
</table>
<dl>
<dd>†On z/OS&reg; systems, permissions for existing cache directories are unchanged, to avoid generating RACF&reg; errors, which generate log messages.</dd>
<dd><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> It is good practice to explicitly set permissions for the cache directory when the defaults are not appropriate. See <a href="../shrc/#best-practices-for-using-xshareclasses">Class data sharing: Best practices for using <code>-Xshareclasses</code></a>.</dd>
</dl>
<h3 id="cacheretransformed"><code>cacheRetransformed</code></h3>
<pre><code> -Xshareclasses:cacheRetransformed
</code></pre>
<dl>
<dd>Enables caching of classes that are transformed by using the JVMTI <code>RetransformClasses</code> function. For more information, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/shrc_pd_rbm_jvmti.html">JVMTI redefinition and retransformation of classes</a>.</dd>
</dl>
<p>The option <code>enableBCI</code> is enabled by default. However, if you use the <code>cacheRetransformed</code> option, this option forces cache creation into <code>-Xshareclasses:disableBCI</code> mode.</p>
<h3 id="checkurltimestamps"><code>checkURLTimestamps</code></h3>
<pre><code> -Xshareclasses:checkURLTimestamps
</code></pre>
<dl>
<dd>Causes timestamps of <code>jar</code> or <code>zip</code> files to be checked every time a class is loaded. If a timestamp has changed, the class is loaded from the <code>jar</code> or <code>zip</code> file and not from the shared cache. This suboption is not enabled by default and reflects the legacy behavior of the shared classes cache.</dd>
<dd><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> The timestamp of a bootstrap <code>jar</code> or <code>zip</code> file is checked once when it is used for the first time to load a class.</dd>
</dl>
<h3 id="createlayer"><code>createLayer</code></h3>
<p><strong>(64-bit only)</strong></p>
<pre><code> -Xshareclasses:createLayer
</code></pre>
<dl>
<dd>Creates layered caches.</dd>
<dd>If there are multiple VMs in a race condition while creating a layered cache, more than one new layered cache can be created. To avoid this situation, use the <code>-Xshareclasses:layer=&lt;number&gt;</code> suboption to create a new layered cache with a specific layer number. See <a href="./#layer"><code>layer</code></a> for more information about layered caches.</dd>
</dl>
<h3 id="destroy-cache-utility"><code>destroy</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:destroy
</code></pre>
<dl>
<dd>Destroys a cache that is specified by the <code>name</code>, <code>cacheDir</code>, and <code>nonpersistent</code> suboptions. A cache can be destroyed only if all VMs that are using it have ended and the user has sufficient permissions.</dd>
</dl>
<h3 id="destroyall-cache-utility"><code>destroyAll</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:destroyAll
</code></pre>
<dl>
<dd>Tries to destroy all the caches that are specified by the <code>cacheDir</code> and <code>nonpersistent</code> suboptions.</dd>
<dd>On Windows and z/OS systems, a cache can be destroyed only if all VMs that are using it have shut down and the user has sufficient permissions.</dd>
<dd><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> On z/OS, when the <code>destroyAll</code> option is invoked from a 31-bit VM, 64-bit caches are not destroyed. Similarly, when the <code>destroyAll</code> option is invoked from a 64-bit VM, 31-bit caches are not destroyed. The following message is displayed:<pre><code>JVMSHRC735I: Use a nn-bit VM to perform the requested operation on the
nn-bit shared cache "cachename" as the nn-bit VM
cannot verify that the shared memory was created by the VM.
</code></pre>
</dd>
<dd>
<p>On AIX, Linux, and macOS systems:</p>
</dd>
</dl>
<ul>
<li>
<p>Non-persistent caches can be destroyed only if all VMs that are using it have shut down and the user has sufficient permissions.</p>
</li>
<li>
<p>Persistent caches that are still in use continue to exist even when you use this option, but they are unlinked from the file system so they are not visible to new VM invocations. If you update the VM then restart an application for which a persistent shared cache already exists, the VM unlinks the existing cache and creates a new cache. Because the unlinked caches are not visible to new VMs, you cannot find them by using the <code>-Xshareclasses:listAllCaches</code> option, and you cannot use the <code>-Xshareclasses:printStats</code> option on them. You can therefore have multiple unlinked caches that consume file system space until they are no longer in use.</p>
</li>
</ul>
<h3 id="destroyalllayers"><code>destroyAllLayers</code></h3>
<p><strong>(64-bit only)</strong></p>
<pre><code> -Xshareclasses:destroyAllLayers
</code></pre>
<dl>
<dd>Destroys all shared cache layers that are specified by the <code>name</code> suboption. For example, <code>-Xshareclasses:name=Cache1,destroyAllLayers</code> destroys all layers of the cache called <code>Cache1</code>. If you use the <code>destroy</code> suboption on a layered cache, for example <code>-Xshareclasses:name=Cache1,destroy</code>, only the top layer of the cache is destroyed.</dd>
<dd>For more information about layered caches, see the <a href="./#layer"><code>layer</code></a> suboption.</dd>
</dl>
<h3 id="destroyallsnapshots-cache-utility"><code>destroyAllSnapshots</code> (Cache utility)</h3>
<dl>
<dd><strong>(Not Windows)</strong><pre><code>-Xshareclasses:destroyAllSnapshots
</code></pre>
</dd>
<dd>
<p>Destroys all shared cache snapshots that are available as a result of the specified <code>cacheDir</code> suboption.</p>
</dd>
</dl>
<h3 id="destroysnapshot-cache-utility"><code>destroySnapshot</code> (Cache utility)</h3>
<dl>
<dd><strong>(Not Windows)</strong><pre><code>-Xshareclasses:destroySnapshot
</code></pre>
</dd>
<dd>
<p>Destroys a snapshot that is specified by the <code>name</code> and <code>cacheDir</code> suboptions.</p>
</dd>
</dl>
<h3 id="disablebci"><code>disableBCI</code></h3>
<pre><code> -Xshareclasses:disableBCI
</code></pre>
<dl>
<dd>Turns off BCI support. This option can be used to override <a href="../xxshareclassesenablebci/"><code>-XXShareClassesEnableBCI</code></a>.</dd>
</dl>
<h3 id="enablebci"><code>enableBCI</code></h3>
<pre><code> -Xshareclasses:enableBCI
</code></pre>
<dl>
<dd>This option is enabled by default.</dd>
<dd>Allows a JVMTI <code>ClassFileLoadHook</code> event to be triggered every time, for classes that are loaded from the cache. This mode also prevents caching of classes that are modified by JVMTI agents. For more information about this option, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/shrc_pd_rbm_jvmti_mod.html">Using the JVMTI ClassFileLoadHook with cached classes</a>. This option is incompatible with the <a href="#cacheretransformed"><code>cacheRetransformed</code></a> option. Using the two options together causes the VM to end with an error message, unless <a href="#nonfatal"><code>-Xshareclasses:nonfatal</code></a> is specified. In this
case, the VM continues without using shared classes.</dd>
<dd>A cache that is created without the <code>enableBCI</code> suboption cannot be reused with the <code>enableBCI</code> suboption. Attempting to do so causes the VM to end with an error message, unless <a href="#nonfatal"><code>-Xshareclasses:nonfatal</code></a> is specified. In this case, the VM continues without using shared classes. A cache that is created with the <code>enableBCI</code> suboption can be reused without specifying this suboption. In this case, the VM detects that the cache was created with the <code>enableBCI</code> suboption and uses the cache in this mode.</dd>
</dl>
<h3 id="expire-cache-utility"><code>expire</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:expire=&lt;time_in_minutes&gt;
</code></pre>
<dl>
<dd>Destroys all caches that are unused for the time that is specified before loading shared classes. This option is not a utility option because it does not cause the VM to exit. On Windows systems, which have NTFS file systems, the <code>expire</code> option is accurate to the nearest hour.</dd>
</dl>
<h3 id="fatal"><code>fatal</code></h3>
<pre><code> -Xshareclasses:fatal
</code></pre>
<dl>
<dd>The VM does not start if class data sharing fails, for example because there was an error when accessing the cache directory. An error message is generated. This suboption is specified by default unless you use the <code>bootClassesOnly</code> suboption, which is equivalent to <code>-Xshareclasses:bootClassesOnly,nonfatal</code>. You can override this behavior by specifying <code>-Xshareclasses:bootClassesOnly,fatal</code>. See also <a href="#nonfatal"><code>nonfatal</code></a>.</dd>
</dl>
<h3 id="findaotmethods-cache-utility"><code>findAotMethods</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:findAotMethods=&lt;method_specification&gt;
-Xshareclasses:findAotMethods=help
</code></pre>
<dl>
<dd>Print the AOT methods in the shared cache that match the method specifications. Methods that are already invalidated are indicated in the output. Use this suboption to check which AOT methods in the shared class cache would be invalidated by using the same method specifications with the <code>invalidateAotMethods</code> suboption. To learn more about the syntax to use for <code>&lt;method_specification&gt;</code>, including how to specify more than one method, see <a href="#method-specification-syntax">Method specification syntax</a>.</dd>
</dl>
<h3 id="groupaccess"><code>groupAccess</code></h3>
<dl>
<dd><strong>(Not Windows)</strong><pre><code>-Xshareclasses:groupAccess
</code></pre>
</dd>
<dd>
<p>Sets operating system permissions on a new cache to allow group access to the cache. Group access can be set only when permitted by the operating system <code>umask</code> setting. The default is user access only.</p>
</dd>
<dd>
<p>On AIX, Linux, and macOS systems, if a user creates a cache by specifying the <code>groupAccess</code> suboption, other users in the same group must also specify this suboption to be granted access to the same cache.</p>
</dd>
<dd>
<p>In certain situations, warning messages might be generated when the <code>groupAccess</code> suboption is used.</p>
</dd>
<dd>
<p>This message can occur when persistent caches are used:</p>
<pre><code>JVMSHRC756W Failed to set group access permission on the shared cache
file as requested by the 'groupAccess' sub-option
</code></pre>
</dd>
<dd>
<p>These messages can occur when non-persistent caches are used:</p>
<pre><code>JVMSHRC759W Failed to set group access permission as requested by the
'groupAccess' sub-option on the semaphore control file associated
with shared class cache.
JVMSHRC760W Failed to set group access permission as requested by the
'groupAccess' sub-option on the shared memory control file associated
with shared class cache.
</code></pre>
</dd>
<dd>
<p>This message can occur in combination with the <code>snapshotCache</code> suboption:</p>
<pre><code>JVMSHRC761W Failed to set group access permission as requested by the
'groupAccess' sub-option on the shared cache snapshot file.
</code></pre>
</dd>
<dd>
<p>All of these warning messages mean that the user's <strong>umask</strong> setting does not allow either, or both, of the group <code>read</code> and <code>write</code> permission to be set on the file. The typical umask setting restricts only the <code>write</code> permission. To resolve the warning, either change the <strong>umask</strong> setting or remove the <code>groupAccess</code> suboption.</p>
</dd>
</dl>
<h3 id="help"><code>help</code></h3>
<pre><code> -Xshareclasses:help
</code></pre>
<dl>
<dd>Lists all the command-line options.</dd>
</dl>
<h3 id="invalidateaotmethods-cache-utility"><code>invalidateAotMethods</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:invalidateAotMethods=&lt;method_specification&gt;
-Xshareclasses:invalidateAotMethods=help
</code></pre>
<dl>
<dd>Modify the existing shared cache to invalidate the AOT methods that match the method specifications. Use this suboption to invalidate AOT methods that cause a failure in the application, without having to destroy the shared cache. Invalidated AOT methods remain in the shared cache, but are then excluded from being loaded. VMs that have not processed the methods, or new VMs that use the cache are not affected by the invalidated methods. The AOT methods are invalidated for the lifetime of the cache, but do not prevent the AOT methods from being compiled again if a new shared cache is created. To prevent AOT method compilation into a new shared cache, use the <code>-Xaot:exclude</code> option. For more information, see <a href="../xaot/#exclude">-Xaot</a>.</dd>
<dd>To identify AOT problems, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/jit_pd_diagnose.html">Diagnosing a JIT or AOT problem</a>.</dd>
<dd>To revalidate an AOT method, see the <code>revalidateAotMethods</code> suboption. Use the <code>findAotMethod</code> suboption to determine which AOT methods match the method specifications. To learn more about the syntax to use for <code>&lt;method_specification&gt;</code>, including how to specify more than one method, see <a href="#method-specification-syntax">Method specification syntax</a>.</dd>
</dl>
<h3 id="layer"><code>layer</code></h3>
<p>(64-bit only)</p>
<pre><code> -Xshareclasses:layer=&lt;number&gt;
</code></pre>
<dl>
<dd>Creates layered caches.</dd>
<dd>This suboption has the same effect as the <a href="./#createlayer"><code>createLayer</code></a> suboption, but with the added ability to specify the layer number.</dd>
<dd>One scenario where you might want to use a layered cache is if you are building a Docker image. Normally, writing to an existing shared cache in a lower image layer results in Docker duplicating the shared cache to the top layer (following the Docker <a href="https://docs.docker.com/storage/storagedriver/#the-copy-on-write-cow-strategy">copy-on-write strategy</a>). With a layered cache, you can instead write into a new cache in the top layer. The new cache builds on the existing cache, so space is saved in the image.</dd>
<dd>The following example shows a Docker container with four layers:</dd>
<dd><img alt="This diagram is explained in the surrounding text" src="../cr/shrc_layers.jpg" title="Docker container with layered caches" /></dd>
</dl>
<ol>
<li>The lowest layer is a Ubuntu Docker image.</li>
<li>
<p>The next layer is an OpenJ9 Docker image that is built on the Ubuntu image. As part of this image, the <code>-Xshareclasses:name=Cache1</code> suboption is used to create a cache called <code>Cache1</code>. The layer number assigned to this cache is 0. The <code>listAllCaches</code> suboption shows the cache and the layer number:</p>
<pre><code>java -Xshareclasses:listAllCaches
...
Cache name level cache-type feature layer OS shmid OS semid last detach time
Compatible shared caches
Cache1 Java8 64-bit persistent cr 0 Mon Sep 23 11:41:04 2019
</code></pre>
</li>
<li>
<p>The next Docker layer up is an Open Liberty image that is built on the OpenJ9 image. As part of this image, the <code>-Xshareclasses:name=Cache1,layer=1</code> suboption is used to create another cache called Cache1. Because the <code>layer=1</code> suboption is specified, this new cache is a layered cache, which builds on <code>Cache1</code> in the previous container layer. (Open Liberty starts two VMs, so if you instead use the <code>createLayer</code> suboption here, two layered caches are created, with layer numbers of 1 and 2.) Note that cache layers are different from, and independent of, container layers. </p>
</li>
<li>
<p>In the same way, another Docker layer is added for an Open Liberty Java application, and another layered cache is created to add to <code>Cache1</code>. The <code>listAllCaches</code> suboption now shows all the caches and their layers:</p>
<pre><code>java -Xshareclasses:listAllCaches
...
Cache name level cache-type feature layer OS shmid OS semid last detach time
Compatible shared caches
Cache1 Java8 64-bit persistent cr 0 Mon Sep 23 11:41:04 2019
Cache1 Java8 64-bit persistent cr 1 Mon Sep 23 11:46:25 2019
Cache1 Java8 64-bit persistent cr 2 In use
</code></pre>
</li>
</ol>
<dl>
<dd>The caches are created in the same directory.</dd>
<dd>When you use the <code>-Xshareclasses:name=Cache1</code> suboption in future Java commands, all the caches are started. The top-layer cache is started in read/write mode, and lower-layer caches are started in read-only mode. Modifying a lower-layer cache would invalidate all the caches in the layers above.</dd>
</dl>
<h3 id="listallcaches-cache-utility"><code>listAllCaches</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:listAllCaches
</code></pre>
<dl>
<dd>Lists all the compatible and incompatible caches, and snapshots that exist in the specified cache directory. If you do not specify <code>cacheDir</code>, the default directory is used. Summary information, such as Java version and current usage, is displayed for each cache.</dd>
</dl>
<h3 id="mprotect"><code>mprotect</code></h3>
<dl>
<dd>AIX, z/OS 31-bit:<pre><code>-Xshareclasses:mprotect=[default|all|none]
</code></pre>
</dd>
<dd>
<p>Linux, Windows, macOS:</p>
<pre><code>-Xshareclasses:mprotect=[default|all|partialpagesonstartup|onfind|nopartialpages|none]
</code></pre>
</dd>
<dd>
<p>where:</p>
<ul>
<li><code>default</code>: By default, the memory pages that contain the cache are always protected, unless a specific page is being updated. This protection helps prevent accidental or deliberate corruption to the cache. The cache header is not protected by default because this protection has a performance cost. On Linux, macOS, and Windows systems, after the startup phase, the Java virtual machine (VM) protects partially filled pages whenever new data is added to the shared class cache in the following sequence:<ul>
<li>The VM changes the memory protection of any partially filled pages to read/write.</li>
<li>The VM adds the data to the cache.</li>
<li>The VM changes the memory protection of any partially filled pages to read only.</li>
</ul>
</li>
<li><code>all</code>: This value ensures that all the cache pages are protected, including the header. See Note.</li>
<li><code>partialpagesonstartup</code>: This value causes the VM to protect partially filled pages during startup as well as after the startup phase. This value is available only on Linux, macOS, and Windows systems.</li>
<li><code>onfind</code>: When this option is specified, the VM protects partially filled pages when it reads new data in the cache that is added by another VM. This option is available only on Linux, macOS, and Windows systems.</li>
<li><code>nopartialpages</code>: Use this value to turn off the protection of partially filled pages. This value is available only on Linux, macOS, and Windows systems.</li>
<li><code>none</code>: Specifying this value disables the page protection.</li>
</ul>
</dd>
<dd>
<p><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> Specifying <code>all</code> has a negative impact on performance. You should specify <code>all</code> only for problem diagnosis and not for production. Specifying values <code>partialpagesonstartup</code> or <code>onfind</code> can also have a negative impact on performance when the cache is being populated. There is no further impact when the cache is full or no longer being modified.</p>
</dd>
</dl>
<h3 id="modified"><code>modified</code></h3>
<pre><code> -Xshareclasses:modified=&lt;modified_context&gt;
</code></pre>
<dl>
<dd>Used when a JVMTI agent is installed that might modify bytecode at run time. If you do not specify this suboption and a bytecode modification agent is installed, classes are safely shared with an extra performance cost. The <code>&lt;modified context&gt;</code> is a descriptor that is chosen by the user; for example, <em>myModification1</em>. This option partitions the cache so that only VMs that are using context <em>myModification1</em> can share the same classes. So if, for example, you run an application with a modification context and then run it again with a different modification context, all classes are stored twice in the cache.</dd>
<dd>For more information, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/shrc_pd_runtime_bytecode_mod.html">Dealing with runtime bytecode modification</a>.</dd>
<dd>If you are migrating from IBM&reg; SDK, Java Technology Edition, Version 7, or earlier releases, you must set <a href="#disablebci"><code>-Xshareclasses:disableBCI</code></a> when you use this option to retain the same behavior.</dd>
</dl>
<h3 id="name"><code>name</code></h3>
<pre><code> -Xshareclasses:name=&lt;name&gt;
</code></pre>
<dl>
<dd>Connects to a cache of a given name, creating the cache if it does not exist. This option is also used to indicate the cache that is to be modified by cache utilities; for example, <code>destroy</code>. Use the <code>listAllCaches</code> utility to show which named caches are currently available. If you do not specify a name, the default name <em>"sharedcc_%u"</em> is used. "%u" in the cache name inserts the current user name. On operating systems other than Windows, you can specify <em>"%g"</em> in the cache name to insert the current group name.</dd>
<dd><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> It is good practice to explicitly specify a cache for your application. This avoids the application sharing a cache that is enabled by default or with another application that doesn't set a name, and ensures that the size of your application cache can be set appropriately and that cache space is used exclusively for your application. Note that you cannot change the size of a default cache that already exists by using the <a href="../xscmx/"><code>-Xscmx</code></a> option, as that option has no effect on a pre-existing cache. See <a href="../shrc/#best-practices-for-using-xshareclasses">Class data sharing: Best practices for using <code>-Xshareclasses</code></a>.</dd>
</dl>
<h3 id="noaot"><code>noaot</code></h3>
<pre><code> -Xshareclasses:noaot
</code></pre>
<dl>
<dd>Disables caching and loading of AOT code. AOT code already in the shared data cache can be loaded.</dd>
</dl>
<h3 id="nobootclasspath"><code>noBootclasspath</code></h3>
<pre><code> -Xshareclasses:noBootclasspath
</code></pre>
<dl>
<dd>Disables the storage of classes that are loaded by the bootstrap class loader in the shared classes cache. Often used with the <code>SharedClassURLFilter</code> API to control exactly which classes are cached. For more information about shared class filtering, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/shrc_pd_helper_class.html">Using the SharedClassHelper API</a>.</dd>
</dl>
<h3 id="notimestampchecks"><code>noTimestampChecks</code></h3>
<pre><code> -Xshareclasses:noTimestampChecks
</code></pre>
<dl>
<dd>Turns off timestamp checking when finding classes in the shared cache. Use this option only when you know there are no updates to the classes from the class paths or module paths in your application. Otherwise, obsolete classes might be loaded from the shared cache. If this happens, remove the <code>noTimestampChecks</code> option.</dd>
</dl>
<h3 id="nocheckurltimestamps"><code>nocheckURLTimestamps</code></h3>
<pre><code> -Xshareclasses:nocheckURLTimestamps
</code></pre>
<dl>
<dd>Timestamps of <code>jar</code> or <code>zip</code> files are checked only when they are added to a class loader and used for the first time to look up a class. This is the default
behavior, which can improve the performance of class loading from the shared classes cache, especially on Windows systems. To revert to the behavior of the shared classes cache in earlier releases, use the <a href="./#checkurltimestamps"><code>CheckURLTimeStamps</code></a> suboption.</dd>
<dd><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <strong>Restriction:</strong> When the <code>nocheckURLTimestamps</code> suboption is used (default), if <code>jar</code> or <code>zip</code> files are updated after a class loader starts loading classes from them, an older version of the class might be loaded from the shared classes cache. If this scenario occurs, use the <code>checkURLTimestamps</code> option.</dd>
</dl>
<h3 id="nojitdata"><code>nojitdata</code></h3>
<pre><code> -Xshareclasses:nojitdata
</code></pre>
<dl>
<dd>Disables caching of JIT data. JIT data already in the shared data cache can be loaded.</dd>
</dl>
<h3 id="none"><code>none</code></h3>
<pre><code> -Xshareclasses:none
</code></pre>
<dl>
<dd>Added to the end of a command line, disables class data sharing. This suboption overrides class sharing arguments found earlier on the command line. This suboption disables the shared class utility APIs. To disable class data sharing without disabling the utility APIs, use the <code>utilities</code> suboption. For more information about the shared class utility APIs, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/shrc_pd_helper_getting_shrc_info.html">Obtaining information about shared caches</a>.</dd>
</dl>
<h3 id="nonfatal"><code>nonfatal</code></h3>
<pre><code> -Xshareclasses:nonfatal
</code></pre>
<dl>
<dd>Allows the VM to start even if class data sharing fails. Normal behavior for the VM is to refuse to start if class data sharing fails. If you select <code>nonfatal</code> and the shared classes cache fails to initialize, the VM attempts to connect to the cache in read-only mode. If this attempt fails, the VM starts without class data sharing. See also <a href="#fatal"><code>fatal</code></a>.</dd>
<dd><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> Unless it is important that your application runs with class data sharing, it is good practice to set this parameter. See <a href="../shrc/#best-practices-for-using-xshareclasses">Class data sharing: Best practices for using <code>-Xshareclasses</code></a>.</dd>
</dl>
<h3 id="nonpersistent"><code>nonpersistent</code></h3>
<pre><code> -Xshareclasses:nonpersistent
</code></pre>
<dl>
<dd>Uses a nonpersistent cache. The cache is lost when the operating system shuts down. Nonpersistent and persistent caches can have the same name. On Linux, macOS, and Windows systems, you must always use the <code>nonpersistent</code> suboption when you run utilities such as <code>destroy</code> on a nonpersistent cache. z/OS supports only nonpersistent caches.</dd>
<dd><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> On macOS systems, you must set <code>kern.sysv.shmmax</code> and <code>kern.sysv.shmall</code> when using a nonpersistent cache.</dd>
</dl>
<h3 id="nopersistentdiskspacecheck"><code>noPersistentDiskSpaceCheck</code></h3>
<pre><code> -Xshareclasses:noPersistentDiskSpaceCheck
</code></pre>
<dl>
<dd>Instructs the VM not to check for available storage on the file system before creating a persistent shared classes cache. This option prevents an error on file systems that do not support the checking of free space, where a value of 0 is returned and a shared cache cannot be created. Regardless of whether you choose to set this option, if there isn't enough disk space available when the VM writes to the shared cache memory, a <strong>SIGBUS</strong> or <strong>SIGSEGV</strong> signal occurs and the VM ends.</dd>
<dd>If you are using the <a href="#readonly"><code>readonly</code></a> suboption, the VM does not check the available disk space, so you do not need to set the <code>noPersistentDiskSpaceCheck</code> suboption.</dd>
</dl>
<h3 id="persistent"><code>persistent</code></h3>
<pre><code> -Xshareclasses:persistent
</code></pre>
<dl>
<dd>Uses a persistent cache. The cache is created on disk, which persists beyond operating system restarts. Nonpersistent and persistent caches can have the same name. On AIX, you must always use the <code>persistent</code> suboption when you run utilities such as <code>destroy</code> on a persistent cache.</dd>
<dd><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Note:</strong> Persisent caches are not supported on z/OS systems. z/OS supports only nonpersistent caches.</dd>
</dl>
<h3 id="printallstats-cache-utility"><code>printAllStats</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:printAllStats
</code></pre>
<dl>
<dd>Displays detailed information about the contents of the cache that is specified in the <a href="#name"><code>name</code></a> suboption. If the name is not specified, statistics are displayed about the default cache. For layered caches, information is shown for all layers (to see information for the top layer cache only, use <a href="#printtoplayerstats-cache-utility"><code>printTopLayerStats=all</code></a>). Every class is listed in chronological order with a reference to the location from which it was loaded. For more information, see <a href="../shrc_diag_util/">Diagnostic cache utilities</a>.</dd>
</dl>
<h3 id="printstats-cache-utility"><code>printStats</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:printStats=&lt;data_type&gt;[+&lt;data_type&gt;]
</code></pre>
<dl>
<dd>Displays summary information for the cache that is specified by the <a href="#name"><code>name</code></a>, <a href="#cachedir"><code>cacheDir</code></a>, and <a href="#nonpersistent"><code>nonpersistent</code></a> suboptions. For layered caches, information is shown for all layers (to see information for the top layer cache only, use <a href="#printtoplayerstats-cache-utility"><code>printTopLayerStats</code></a>). The most useful information that is displayed is how full the cache is and how many classes it contains. Stale classes are classes that are updated on the file system and which the cache has therefore marked as "stale". Stale classes are not purged from the cache and can be reused. Use the <code>printStats=stale</code> option to list all the stale entries and stale bytes.</dd>
<dd>Specify one or more data types, which are separated by a plus symbol (+), to see more detailed information about the cache content. Data types include AOT data, class paths, and ROMMethods.</dd>
<dd>For more information and for a full list of data types, see <a href="../shrc_diag_util/">Diagnostic cache utilities</a>.</dd>
</dl>
<h3 id="printtoplayerstats-cache-utility"><code>printTopLayerStats</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:printTopLayerStats=&lt;data_type&gt;[+&lt;data_type&gt;]
</code></pre>
<dl>
<dd>Equivalent to <a href="#printstats-cache-utility"><code>printStats</code></a> but for the top layer cache only.</dd>
</dl>
<h3 id="readonly"><code>readonly</code></h3>
<pre><code> -Xshareclasses:readonly
</code></pre>
<dl>
<dd>Opens an existing cache with read-only permissions. The Java virtual machine does not create a new cache with this suboption. Opening a cache read-only prevents the VM from making any updates to the cache. If you specify this suboption, the VM can connect to caches that were created by other users or groups without requiring write access.</dd>
<dd>On AIX, Linux, and macOS systems, this access is permitted only if the cache was created by using the <a href="#cachedir"><code>-Xshareclasses:cacheDir</code></a> option to specify a directory with appropriate permissions. If you do not use the <code>-Xshareclasses:cacheDir</code> option, the cache is created with default permissions, which do not permit access by other users or groups.</dd>
<dd>By default, this suboption is not specified.</dd>
</dl>
<h3 id="reset"><code>reset</code></h3>
<pre><code> -Xshareclasses:reset
</code></pre>
<dl>
<dd>Causes a cache to be destroyed and then re-created when the VM starts up. This option can be added to the end of a command line as <code>-Xshareclasses:reset</code>.</dd>
</dl>
<h3 id="restorefromsnapshot-cache-utility"><code>restoreFromSnapshot</code> (Cache utility)</h3>
<dl>
<dd><strong>(Not Windows)</strong><pre><code>-Xshareclasses:restoreFromSnapshot
</code></pre>
</dd>
<dd>
<p>Restores a new non-persistent shared cache from a snapshot file. The snapshot and shared cache have the same name and location, as specified by the <a href="#name"><code>name</code></a> and <a href="#cachedir"><code>cacheDir</code></a> suboptions. The non-persistent cache cannot already exist when the snapshot is restored. Restoring a snapshot does not remove the snapshot file; it can be restored multiple times. On platforms that support persistent caches, the <a href="#nonpersistent"><code>nonpersistent</code></a> suboption must be specified in order to restore a snapshot.</p>
</dd>
</dl>
<h3 id="restrictclasspaths"><code>restrictClasspaths</code></h3>
<pre><code> -Xshareclasses:restrictClasspaths
</code></pre>
<dl>
<dd>Allows only the first VM that is initializing a shared cache to store classpaths in the cache. Subsequent VMs are not allowed to store classpaths in the cache unless the <code>allowClasspaths</code> option is specified.</dd>
<dd>Use the <code>restrictClasspaths</code> option only if the application is designed to create class loaders of type <code>java.net.URLClassloader</code> or its subclass, such that their classpaths are unique to the instance of the application, but the classes that are loaded from these classpaths are the same. In such cases application classpaths that are stored by one VM cannot be used by another VM.</dd>
<dd>
<p>For example, consider two VMs, VM1 and VM2, that are using class paths CP1 and CP2 respectively, where:</p>
<ul>
<li>CP1: <code>url1;url2;url3;tempurl1;url4;url5</code></li>
<li>CP2: <code>url1;url2;url3;tempurl2;url4;url5</code></li>
</ul>
</dd>
<dd>
<p>These class paths differ only by one entry, which is the <code>tempurl</code>. The <code>url1</code>, <code>url2</code>, <code>url3</code>, <code>url4</code>, and <code>url5</code> entries never change from run to run, whereas the <code>tempurl</code> entry is always different. This difference means that a class that is loaded from <code>url4</code> or <code>url5</code>, and stored into the shared cache by VM1, cannot be located by VM2. Therefore, an attempt by VM2 to load a class from <code>url4</code> or <code>url5</code> would cause it to store its own classpath <code>CP2</code> into the shared cache, and also add new metadata for classes that are loaded from <code>url4</code> or <code>url5</code>. Addition of such unique class paths into the shared cache is not useful. Moreover, the additional metadata might adversely affect the performance of other VMs that connect to the shared cache. Because classes loaded from <code>url4</code> or <code>url5</code> are not loaded from the shared cache when the <code>tempurl</code> differs from the original, it is good practice to put the <code>tempurl</code> as the last entry in the class path.</p>
</dd>
<dd>
<p>In situations such as that described in the example, the <code>restrictClasspaths</code> option can be used to restrict the addition of classpaths by ensuring that the first VM initializes the shared cache, and then prevents the addition of unique classpaths by subsequent VMs that attach to the shared cache. Note that use of the <code>restrictClasspaths</code> option in any other scenario is likely to negatively impact a VM's performance when it is using an existing cache.</p>
</dd>
</dl>
<h3 id="revalidateaotmethods-cache-utility"><code>revalidateAotMethods</code> (Cache utility)</h3>
<pre><code> -Xshareclasses:revalidateAotMethods=&lt;method_specification&gt;
-Xshareclasses:revalidateAotMethods=help
</code></pre>
<dl>
<dd>Modify the shared cache to revalidate the AOT methods that match the method specifications. Use this suboption to revalidate AOT methods that were invalidated by using the <a href="#invalidateaotmethods-cache-utility"><code>invalidateAotMethods</code></a> suboption. Revalidated AOT methods are then eligible for loading into a VM, but do not affect VMs where the methods have already been processed. To learn more about the syntax to use for <code>&lt;method_specification&gt;</code>, including how to specify more than one method, see <a href="#method-specification-syntax">Method specification syntax</a>.</dd>
</dl>
<h3 id="silent"><code>silent</code></h3>
<pre><code> -Xshareclasses:silent
</code></pre>
<dl>
<dd>Disables all shared class messages, including error messages. Unrecoverable error messages, which prevent the VM from initializing, are displayed.</dd>
</dl>
<h3 id="snapshotcache-cache-utility"><code>snapshotCache</code> (Cache utility)</h3>
<dl>
<dd><strong>(Not Windows)</strong><pre><code>-Xshareclasses:snapshotCache
</code></pre>
</dd>
<dd>
<p>Creates a snapshot file of an existing non-persistent shared cache. The snapshot has the same name and location as the shared cache, as specified by the <a href="#name"><code>name</code></a> and <a href="#cachedir"><code>cacheDir</code></a> suboptions. The shared cache can be in use when the snapshot is taken, but VMs are blocked when they try to write to the shared cache, while the cache data is copied to the file.</p>
</dd>
<dd>
<p>Typically, after a system is reinitialized, the snapshot file is used to restore the copy of the non-persistent cache into shared memory, via the <a href="#restorefromsnapshot-cache-utility"><code>restoreFromSnapshot</code></a> suboption. Since this process removes all non-persistent caches from shared memory, restoring the cache from the snapshot file can result in better VM startup performance, because the contents of the shared cache, including classes and AOT code, do not have to be re-created.</p>
</dd>
<dd>
<p>A snapshot can be created only if the user has sufficient permissions to create the destination snapshot file. If a snapshot of the same name exists already, it is overwritten. On platforms that support persistent caches, the <a href="#nonpersistent"><code>nonpersistent</code></a> suboption must be specified in order to create a snapshot. For information about removing snapshot files, see the <a href="#destroysnapshot-cache-utility"><code>destroySnapshot</code></a> and <a href="#destroyallsnapshots-cache-utility"><code>destroyAllSnapshots</code></a> suboptions.</p>
</dd>
</dl>
<h3 id="utilities"><code>utilities</code></h3>
<pre><code> -Xshareclasses:utilities
</code></pre>
<dl>
<dd>Can be added to the end of a command line to disable class data sharing. This suboption overrides class sharing arguments found earlier on the command line. This suboption is like <a href="#none"><code>none</code></a>, but does not disable the shared class utility APIs. For more information about the shared class utility APIs, see <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/shrc_pd_helper_getting_shrc_info.html">Obtaining information about shared caches</a>.</dd>
</dl>
<h3 id="verbose"><code>verbose</code></h3>
<pre><code> -Xshareclasses:verbose
</code></pre>
<dl>
<dd>Gives detailed output on the cache I/O activity, listing information about classes that are stored and found. Each class loader is given a unique ID (the bootstrap loader is always 0) and the output shows the class loader hierarchy at work, where class loaders ask their parents for a class if they can't find it themselves. It is typical to see many failed requests; this behavior is expected for the class loader hierarchy. The standard option <code>-verbose:class</code> also enables class sharing verbose output if class sharing is enabled.</dd>
</dl>
<h3 id="verboseaot"><code>verboseAOT</code></h3>
<pre><code> -Xshareclasses:verboseAOT
</code></pre>
<dl>
<dd>Enables verbose output when compiled AOT code is being found or stored in the cache. AOT code is generated heuristically. You might not see any AOT code that is generated at all for a small application. You can disable AOT caching by using the <code>noaot</code> suboption. See the <a href="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.messages/diag/appendixes/messages/messages.html">VM Messages Guide</a> for a list of the messages produced.</dd>
</dl>
<h3 id="verbosehelper"><code>verboseHelper</code></h3>
<pre><code> -Xshareclasses:verboseHelper
</code></pre>
<dl>
<dd>Enables verbose output for the Java Helper API. This output shows you how the Helper API is used by your class loader.</dd>
</dl>
<h3 id="verboseio"><code>verboseIO</code></h3>
<pre><code> -Xshareclasses:verboseIO
</code></pre>
<dl>
<dd>Gives detailed output on the cache I/O activity, listing information about classes that are stored and found. Each class loader is given a unique ID (the bootstrap loader is always 0) and the output shows the class loader hierarchy at work, where class loaders must ask their parents for a class before they can load it themselves. It is typical to see many failed requests; this behavior is expected for the class loader hierarchy.</dd>
</dl>
<h2 id="method-specification-syntax">Method specification syntax</h2>
<p>The following examples show how to specify more than one method specification when you are using the <a href="#findaotmethods-cache-utility"><code>findAotMethods</code></a>, <a href="#invalidateaotmethods-cache-utility"><code>invalidateAotMethods</code></a>, or <a href="#revalidateaotmethods-cache-utility"><code>revalidateAotMethods</code></a> suboptions.</p>
<p>Each method specification is defined as follows:</p>
<pre><code>&lt;packagename&gt;/&lt;classname&gt;[.&lt;methodname&gt;[(&lt;parameters&gt;)]]
</code></pre>
<p>If you want to include more than one method specification in a single option, separate the specifications with a comma and enclose all the specifications in {braces}. For example:</p>
<pre><code>{&lt;packagename/classname&gt;}[.{&lt;methodname&gt;}[({&lt;parameters&gt;})]]
</code></pre>
<!--
{<method_specification1>,<method_specification2>,<method_specification3>}
-->
<ul>
<li>You can use an asterisk (*) in most places as a wildcard.</li>
<li>You can use an exclamation point (!) before the specification to mean "everything <em>except</em> this".</li>
<li>Parameters are optional, but if specified, should be enclosed in parentheses and the following native signature formats must be used:<ul>
<li><code>B</code> for byte</li>
<li><code>C</code> for char</li>
<li><code>D</code> for double</li>
<li><code>F</code> for float</li>
<li><code>I</code> for int</li>
<li><code>J</code> for long</li>
<li><code>S</code> for short</li>
<li><code>Z</code> for Boolean</li>
<li><code>L&lt;classname&gt;;</code> for objects</li>
<li><code>[</code> before the signature means array</li>
</ul>
</li>
</ul>
<p>If you want to specify parameters to distinguish between methods, you can use <a href="#findaotmethods-cache-utility"><code>-Xshareclasses:findAotMethods=*</code></a> (with a wildcard) to list all the parameter variations. Copy the signature for the method that you want from the output. For example, the signature for the parameters</p>
<pre><code>(byte[] bytes, int offset, int length, Charset charset)
</code></pre>
<p>is</p>
<pre><code>([BIILjava/nio/charset/Charset;)
</code></pre>
<p>Here are some examples:</p>
<table>
<thead>
<tr>
<th>Method signature</th>
<th>Matches...</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>*</code></td>
<td>All AOT methods.</td>
</tr>
<tr>
<td><code>java/lang/Object</code></td>
<td>All AOT methods in the <code>java.lang.Object</code> class</td>
</tr>
<tr>
<td><code>java/util/*</code></td>
<td>All AOT classes and methods in the <code>java.util</code> package</td>
</tr>
<tr>
<td><code>java/util/HashMap.putVal</code></td>
<td>All <code>putVal</code> methods in the <code>java.util.HashMap</code> class</td>
</tr>
<tr>
<td><code>java/util/HashMap.hash(Ljava/lang/Object;)</code></td>
<td>The private <code>java.util.HashMap.hash(java.lang.Object)</code> method</td>
</tr>
<tr>
<td><code>*.equals</code></td>
<td>All <code>equals</code> methods in all classes</td>
</tr>
<tr>
<td><code>{java/lang/Object,!java/lang/Object.clone}</code></td>
<td>All methods in <code>java.lang.Object</code> except <code>clone</code></td>
</tr>
<tr>
<td><code>{java/util/*.*(),java/lang/Object.*(*)}</code></td>
<td>All classes or methods with no input parameter in the <code>java.util</code> package, and all methods in <code>java.lang.Object</code></td>
</tr>
<tr>
<td><code>{java/util/*.*(),!java/util/*.*()}</code></td>
<td>Nothing.</td>
</tr>
</tbody>
</table>
<h2 id="see-also">See also</h2>
<ul>
<li><a href="../xscmx/">-Xscmx</a></li>
<li><a href="../xxsharedcachehardlimit/">-XX:SharedCacheHardLimit</a></li>
<li><a href="../shrc/">Class data sharing</a></li>
</ul>
<!-- ==== END OF TOPIC ==== docs/xshareclasses.md ==== -->
<!--
-->
<!-- This block was originally in the theme's 'footer.html' partial file. It has been moved here in part to resolve issues with the footer being too large. -->
<!--
* Copyright (c) 2017, 2018 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<!-- Ignore all this to remove previous/next links in footer, but leave nav block else lose highlighting in LH navigation
<img alt="" src="../cr/rule.png"> [!-- Separator --]
<a href="xscmx/" title="-Xscmx" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
-Xscmx
</span>
</div>
</a>
<a href="xsigcatch/" title="-Xsigcatch" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
-Xsigcatch
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
-->
</nav>
</div>
</article>
</div>
</div>
</main>
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<cite></cite>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<!--
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution and is available at
* https://www.eclipse.org/legal/epl-2.0/ or the Apache
* License, Version 2.0 which accompanies this distribution and
* is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* This Source Code may also be made available under the
* following Secondary Licenses when the conditions for such
* availability set forth in the Eclipse Public License, v. 2.0
* are satisfied: GNU General Public License, version 2 with
* the GNU Classpath Exception [1] and GNU General Public
* License, version 2 with the OpenJDK Assembly Exception [2].
*
* [1] https://www.gnu.org/software/classpath/license.html
* [2] http://openjdk.java.net/legal/assembly-exception.html
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH
* Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
-->
<div class="md-footer-social1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<a href="https://github.com/eclipse/openj9" class="md-footer-social__link fa fa-github"></a>
<a href="https://openj9.slack.com" class="md-footer-social__link fa fa-slack"></a>
<a href="https://twitter.com/openj9" class="md-footer-social__link fa fa-twitter"></a>
<a href="https://stackoverflow.com/search?q=OpenJ9" class="md-footer-social__link fa fa-stack-overflow"></a>
</div>
<div class="md-footer-eclipse1">OpenJ9 is an Eclipse Incubator project.</div>
<div class="md-footer-links1">
<span class="no-wrap"><i class="fa fa-chevron-circle-right f_mini" aria-hidden="true"></i><a class="dark-link" href="http://www.eclipse.org">Eclipse Foundation website</a></span>
&nbsp; <span class="no-wrap"><i class="fa fa-chevron-circle-right f_mini" aria-hidden="true"></i><a class="dark-link" href="http://www.eclipse.org/legal/privacy.php">Privacy policy</a></span>
&nbsp; <span class="no-wrap"><i class="fa fa-chevron-circle-right f_mini" aria-hidden="true"></i><a class="dark-link" href="http://www.eclipse.org/legal/termsofuse.php">Website terms of use</a></span>
&nbsp; <span class="no-wrap"><i class="fa fa-chevron-circle-right f_mini" aria-hidden="true"></i><a class="dark-link" href="http://www.eclipse.org/legal/copyright.php">Copyright agent</a></span>
&nbsp; <span class="no-wrap"><i class="fa fa-chevron-circle-right f_mini" aria-hidden="true"></i><a class="dark-link" href="http://www.eclipse.org/legal">Legal</a></span>
</div>
<div class="md-footer-power1">
powered by
<a href="http://www.mkdocs.org" title="MkDocs">MkDocs</a>
and
<a href="http://squidfunk.github.io/mkdocs-material/" title="Material for MkDocs">
Material for MkDocs</a><br/><br/>
</div>
</div>
</footer>
</div>
<script src="../assets/javascripts/application.a8b5e56f.js"></script>
<script>app.initialize({version:"1.0.4",url:{base:".."}})</script>
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
}
ga.l = +new Date
/* Setup integration and send page view */
ga("create", "UA-105616558-3", "mkdocs.org")
ga("set", "anonymizeIp", true)
ga("send", "pageview")
/* Register handler to log search on blur */
document.addEventListener("DOMContentLoaded", () => {
if (document.forms.search) {
var query = document.forms.search.query
query.addEventListener("blur", function() {
if (this.value) {
var path = document.location.pathname;
ga("send", "pageview", path + "?q=" + this.value)
}
})
}
})
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</body>
</html>