blob: d8c68fd7bdbb44a0dd370b03b553689399c105a6 [file] [log] [blame]
<!--
* 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
-->
<!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-0.17.2, mkdocs-material-2.6.3">
<title>-Xshareclasses - </title>
<link rel="stylesheet" href="../assets/stylesheets/application.9b572555.css">
<link rel="stylesheet" href="../assets/stylesheets/application-palette.6079476c.css">
<script src="../assets/javascripts/modernizr.1aa3b519.js"></script>
<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="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="../stylesheets/oj9.css">
</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 19-18.125
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 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.75 8-38.375zM416 260q0 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.5-41.75
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
0-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.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
46.75-30.25t47.25-9.75q12.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">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search">
<label class="md-overlay" data-md-component="overlay" for="drawer"></label>
<a href="#-xshareclasses" tabindex="1" class="md-skip">
</a>
<!--
* 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
-->
<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">
<span class="md-nav__button md-logo">
<img src="../cr/openj9_6b.png" width="24" height="24">
</span>
</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="../introduction/" title="Introduction" class="md-nav__link">
Introduction
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
<label class="md-nav__link" for="nav-3">
Release notes
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-3">
Release notes
</label>
<ul class="md-nav__list" data-md-scrollfix>
<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>
<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="../aot/" title="AOT Compiler" class="md-nav__link">
AOT Compiler
</a>
</li>
<li class="md-nav__item">
<a href="../shrc/" title="Class data sharing" class="md-nav__link">
Class data sharing
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8">
<label class="md-nav__link" for="nav-8">
Diagnostics
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-8">
Diagnostics
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../diag_overview/" title="Tools and data" class="md-nav__link">
Tools and data
</a>
</li>
<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--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-9" type="checkbox" id="nav-9" checked>
<label class="md-nav__link" for="nav-9">
Command-line options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-9">
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="Migrating to OpenJ9" class="md-nav__link">
Migrating to OpenJ9
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-9-4" type="checkbox" id="nav-9-4">
<label class="md-nav__link" for="nav-9-4">
System property options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-9-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="../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>
</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-9-5" type="checkbox" id="nav-9-5" checked>
<label class="md-nav__link" for="nav-9-5">
JVM -X options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-9-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="../xdiagnosticscollector/" title="-Xdiagnosticscollector" class="md-nav__link">
-Xdiagnosticscollector
</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="../xrdbginfo/" title="-Xrdbginfo" class="md-nav__link">
-Xrdbginfo
</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" title="Syntax" class="md-nav__link">
Syntax
</a>
</li>
<li class="md-nav__item">
<a href="#parameters" title="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" title="adjustmaxaot (Cache utility)" class="md-nav__link">
adjustmaxaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminaot-cache-utility" title="adjustminaot (Cache utility)" class="md-nav__link">
adjustminaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustmaxjitdata-cache-utility" title="adjustmaxjitdata (Cache utility)" class="md-nav__link">
adjustmaxjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminjitdata-cache-utility" title="adjustminjitdata (Cache utility)" class="md-nav__link">
adjustminjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustsoftmx-cache-utility" title="adjustsoftmx (Cache utility)" class="md-nav__link">
adjustsoftmx (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#allowclasspaths" title="allowClasspaths" class="md-nav__link">
allowClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#cachedir" title="cacheDir" class="md-nav__link">
cacheDir
</a>
</li>
<li class="md-nav__item">
<a href="#cachedirperm" title="cacheDirPerm" class="md-nav__link">
cacheDirPerm
</a>
</li>
<li class="md-nav__item">
<a href="#cacheretransformed" title="cacheRetransformed" class="md-nav__link">
cacheRetransformed
</a>
</li>
<li class="md-nav__item">
<a href="#destroy-cache-utility" title="destroy (Cache utility)" class="md-nav__link">
destroy (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyall-cache-utility" title="destroyAll (Cache utility)" class="md-nav__link">
destroyAll (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyallsnapshots-cache-utility" title="destroyAllSnapshots (Cache utility)" class="md-nav__link">
destroyAllSnapshots (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroysnapshot-cache-utility" title="destroySnapshot (Cache utility)" class="md-nav__link">
destroySnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#disablebci" title="disableBCI" class="md-nav__link">
disableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#enablebci" title="enableBCI" class="md-nav__link">
enableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#expire-cache-utility" title="expire (Cache utility)" class="md-nav__link">
expire (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#findaotmethods-cache-utility" title="findAotMethods (Cache utility)" class="md-nav__link">
findAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#groupaccess" title="groupAccess" class="md-nav__link">
groupAccess
</a>
</li>
<li class="md-nav__item">
<a href="#help" title="help" class="md-nav__link">
help
</a>
</li>
<li class="md-nav__item">
<a href="#invalidateaotmethods-cache-utility" title="invalidateAotMethods (Cache utility)" class="md-nav__link">
invalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#listallcaches-cache-utility" title="listAllCaches (Cache utility)" class="md-nav__link">
listAllCaches (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#mprotect" title="mprotect" class="md-nav__link">
mprotect
</a>
</li>
<li class="md-nav__item">
<a href="#modified" title="modified" class="md-nav__link">
modified
</a>
</li>
<li class="md-nav__item">
<a href="#name" title="name" class="md-nav__link">
name
</a>
</li>
<li class="md-nav__item">
<a href="#noaot" title="noaot" class="md-nav__link">
noaot
</a>
</li>
<li class="md-nav__item">
<a href="#nobootclasspath" title="noBootclasspath" class="md-nav__link">
noBootclasspath
</a>
</li>
<li class="md-nav__item">
<a href="#nojitdata" title="nojitdata" class="md-nav__link">
nojitdata
</a>
</li>
<li class="md-nav__item">
<a href="#none" title="none" class="md-nav__link">
none
</a>
</li>
<li class="md-nav__item">
<a href="#nonfatal" title="nonfatal" class="md-nav__link">
nonfatal
</a>
</li>
<li class="md-nav__item">
<a href="#nonpersistent" title="nonpersistent" class="md-nav__link">
nonpersistent
</a>
</li>
<li class="md-nav__item">
<a href="#persistent" title="persistent" class="md-nav__link">
persistent
</a>
</li>
<li class="md-nav__item">
<a href="#printallstats-cache-utility" title="printAllStats (Cache utility)" class="md-nav__link">
printAllStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#printstats-cache-utility" title="printStats (Cache utility)" class="md-nav__link">
printStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#readonly" title="readonly" class="md-nav__link">
readonly
</a>
</li>
<li class="md-nav__item">
<a href="#reset" title="reset" class="md-nav__link">
reset
</a>
</li>
<li class="md-nav__item">
<a href="#restorefromsnapshot-cache-utility" title="restoreFromSnapshot (Cache utility)" class="md-nav__link">
restoreFromSnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#restrictclasspaths" title="restrictClasspaths" class="md-nav__link">
restrictClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#revalidateaotmethods-cache-utility" title="revalidateAotMethods (Cache utility)" class="md-nav__link">
revalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#silent" title="silent" class="md-nav__link">
silent
</a>
</li>
<li class="md-nav__item">
<a href="#snapshotcache-cache-utility" title="snapshotCache (Cache utility)" class="md-nav__link">
snapshotCache (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#utilities" title="utilities" class="md-nav__link">
utilities
</a>
</li>
<li class="md-nav__item">
<a href="#verbose" title="verbose" class="md-nav__link">
verbose
</a>
</li>
<li class="md-nav__item">
<a href="#verboseaot" title="verboseAOT" class="md-nav__link">
verboseAOT
</a>
</li>
<li class="md-nav__item">
<a href="#verbosehelper" title="verboseHelper" class="md-nav__link">
verboseHelper
</a>
</li>
<li class="md-nav__item">
<a href="#verboseio" title="verboseIO" class="md-nav__link">
verboseIO
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#method-specification-syntax" title="Method specification syntax" class="md-nav__link">
Method specification syntax
</a>
</li>
<li class="md-nav__item">
<a href="#see-also" title="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-9-6" type="checkbox" id="nav-9-6">
<label class="md-nav__link" for="nav-9-6">
JVM -XX: options
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="2">
<label class="md-nav__title" for="nav-9-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="../xxcodecachetotal/" title="-XX:codecachetotal" class="md-nav__link">
-XX:codecachetotal
</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="../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="../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="../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="../xxmaxrampercentage/" title="-XX:MaxRAMPercentage" class="md-nav__link">
-XX:MaxRAMPercentage
</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="../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="../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="../xxstacktraceinthrowable/" title="-XX:-StackTraceInThrowable" class="md-nav__link">
-XX:-StackTraceInThrowable
</a>
</li>
<li class="md-nav__item">
<a href="../xxthreadstacksize/" title="-XX:ThreadStackSize" class="md-nav__link">
-XX:ThreadStackSize
</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="../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-10" type="checkbox" id="nav-10">
<label class="md-nav__link" for="nav-10">
Tools
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-10">
Tools
</label>
<ul class="md-nav__list" data-md-scrollfix>
<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>
</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">
Reference
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-11">
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_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" title="Syntax" class="md-nav__link">
Syntax
</a>
</li>
<li class="md-nav__item">
<a href="#parameters" title="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" title="adjustmaxaot (Cache utility)" class="md-nav__link">
adjustmaxaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminaot-cache-utility" title="adjustminaot (Cache utility)" class="md-nav__link">
adjustminaot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustmaxjitdata-cache-utility" title="adjustmaxjitdata (Cache utility)" class="md-nav__link">
adjustmaxjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustminjitdata-cache-utility" title="adjustminjitdata (Cache utility)" class="md-nav__link">
adjustminjitdata (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#adjustsoftmx-cache-utility" title="adjustsoftmx (Cache utility)" class="md-nav__link">
adjustsoftmx (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#allowclasspaths" title="allowClasspaths" class="md-nav__link">
allowClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#cachedir" title="cacheDir" class="md-nav__link">
cacheDir
</a>
</li>
<li class="md-nav__item">
<a href="#cachedirperm" title="cacheDirPerm" class="md-nav__link">
cacheDirPerm
</a>
</li>
<li class="md-nav__item">
<a href="#cacheretransformed" title="cacheRetransformed" class="md-nav__link">
cacheRetransformed
</a>
</li>
<li class="md-nav__item">
<a href="#destroy-cache-utility" title="destroy (Cache utility)" class="md-nav__link">
destroy (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyall-cache-utility" title="destroyAll (Cache utility)" class="md-nav__link">
destroyAll (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroyallsnapshots-cache-utility" title="destroyAllSnapshots (Cache utility)" class="md-nav__link">
destroyAllSnapshots (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#destroysnapshot-cache-utility" title="destroySnapshot (Cache utility)" class="md-nav__link">
destroySnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#disablebci" title="disableBCI" class="md-nav__link">
disableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#enablebci" title="enableBCI" class="md-nav__link">
enableBCI
</a>
</li>
<li class="md-nav__item">
<a href="#expire-cache-utility" title="expire (Cache utility)" class="md-nav__link">
expire (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#findaotmethods-cache-utility" title="findAotMethods (Cache utility)" class="md-nav__link">
findAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#groupaccess" title="groupAccess" class="md-nav__link">
groupAccess
</a>
</li>
<li class="md-nav__item">
<a href="#help" title="help" class="md-nav__link">
help
</a>
</li>
<li class="md-nav__item">
<a href="#invalidateaotmethods-cache-utility" title="invalidateAotMethods (Cache utility)" class="md-nav__link">
invalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#listallcaches-cache-utility" title="listAllCaches (Cache utility)" class="md-nav__link">
listAllCaches (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#mprotect" title="mprotect" class="md-nav__link">
mprotect
</a>
</li>
<li class="md-nav__item">
<a href="#modified" title="modified" class="md-nav__link">
modified
</a>
</li>
<li class="md-nav__item">
<a href="#name" title="name" class="md-nav__link">
name
</a>
</li>
<li class="md-nav__item">
<a href="#noaot" title="noaot" class="md-nav__link">
noaot
</a>
</li>
<li class="md-nav__item">
<a href="#nobootclasspath" title="noBootclasspath" class="md-nav__link">
noBootclasspath
</a>
</li>
<li class="md-nav__item">
<a href="#nojitdata" title="nojitdata" class="md-nav__link">
nojitdata
</a>
</li>
<li class="md-nav__item">
<a href="#none" title="none" class="md-nav__link">
none
</a>
</li>
<li class="md-nav__item">
<a href="#nonfatal" title="nonfatal" class="md-nav__link">
nonfatal
</a>
</li>
<li class="md-nav__item">
<a href="#nonpersistent" title="nonpersistent" class="md-nav__link">
nonpersistent
</a>
</li>
<li class="md-nav__item">
<a href="#persistent" title="persistent" class="md-nav__link">
persistent
</a>
</li>
<li class="md-nav__item">
<a href="#printallstats-cache-utility" title="printAllStats (Cache utility)" class="md-nav__link">
printAllStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#printstats-cache-utility" title="printStats (Cache utility)" class="md-nav__link">
printStats (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#readonly" title="readonly" class="md-nav__link">
readonly
</a>
</li>
<li class="md-nav__item">
<a href="#reset" title="reset" class="md-nav__link">
reset
</a>
</li>
<li class="md-nav__item">
<a href="#restorefromsnapshot-cache-utility" title="restoreFromSnapshot (Cache utility)" class="md-nav__link">
restoreFromSnapshot (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#restrictclasspaths" title="restrictClasspaths" class="md-nav__link">
restrictClasspaths
</a>
</li>
<li class="md-nav__item">
<a href="#revalidateaotmethods-cache-utility" title="revalidateAotMethods (Cache utility)" class="md-nav__link">
revalidateAotMethods (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#silent" title="silent" class="md-nav__link">
silent
</a>
</li>
<li class="md-nav__item">
<a href="#snapshotcache-cache-utility" title="snapshotCache (Cache utility)" class="md-nav__link">
snapshotCache (Cache utility)
</a>
</li>
<li class="md-nav__item">
<a href="#utilities" title="utilities" class="md-nav__link">
utilities
</a>
</li>
<li class="md-nav__item">
<a href="#verbose" title="verbose" class="md-nav__link">
verbose
</a>
</li>
<li class="md-nav__item">
<a href="#verboseaot" title="verboseAOT" class="md-nav__link">
verboseAOT
</a>
</li>
<li class="md-nav__item">
<a href="#verbosehelper" title="verboseHelper" class="md-nav__link">
verboseHelper
</a>
</li>
<li class="md-nav__item">
<a href="#verboseio" title="verboseIO" class="md-nav__link">
verboseIO
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#method-specification-syntax" title="Method specification syntax" class="md-nav__link">
Method specification syntax
</a>
</li>
<li class="md-nav__item">
<a href="#see-also" title="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, 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
-->
<h1 id="-xshareclasses">-Xshareclasses</h1>
<p>You can use the <code>-Xshareclasses</code> option to enable class sharing. This option can take a number of parameters, some of which are cache utilities.</p>
<p>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>
<h2 id="syntax">Syntax</h2>
<div class="codehilite"><pre><span></span> -Xshareclasses:&lt;parameter&gt;
</pre></div>
<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 of 300 MB, with a "soft" maximum limit for the initial size of the cache (<code>-Xscmx</code>) set to 64MB. The following exceptions apply:</p>
<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, 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>
<h2 id="parameters">Parameters</h2>
<h3 id="adjustmaxaot-cache-utility"><code>adjustmaxaot</code> (Cache utility)</h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:adjustmaxaot=&lt;size&gt;
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:adjustminaot=&lt;size&gt;
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:adjustmaxjitdata=&lt;size&gt;
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:adjustminjitdata=&lt;size&gt;
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:adjustsoftmx=&lt;size&gt;
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:allowClasspaths
</pre></div>
<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="cachedir"><code>cacheDir</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:cacheDir=&lt;directory&gt;
</pre></div>
<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 AIX&reg;, Linux&trade;, and z/OS&reg; systems, <code>&lt;directory&gt;</code> is <code>/tmp/javasharedresources</code>. You must have sufficient permissions in <code>&lt;directory&gt;</code>. For AIX, the directory must not be on an NFS mount for persistent caches.</li>
</ul>
</dd>
<dd>
<p>On AIX, Linux, 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.</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 and Linux 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>
</dl>
<h3 id="cachedirperm"><code>cacheDirPerm</code></h3>
<dl>
<dd><strong>(AIX, Linux, z/OS only)</strong><div class="codehilite"><pre><span></span>-Xshareclasses:cacheDirPerm=&lt;permission&gt;
</pre></div>
</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 777. If you do not set this suboption, the cache directory permissions are set to 777, for compatibility with earlier Java versions.</p>
</dd>
<dd>
<p>On z/OS systems, permissions for existing cache directories are unchanged, to avoid generating RACF&reg; errors, which generate log messages.</p>
</dd>
</dl>
<h3 id="cacheretransformed"><code>cacheRetransformed</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:cacheRetransformed
</pre></div>
<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="destroy-cache-utility"><code>destroy</code> (Cache utility)</h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:destroy
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:destroyAll
</pre></div>
<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:<div class="codehilite"><pre><span></span><span class="n">JVMSHRC735I</span><span class="o">:</span> <span class="n">Use</span> <span class="n">a</span> <span class="n">nn</span><span class="o">-</span><span class="n">bit</span> <span class="n">VM</span> <span class="n">to</span> <span class="n">perform</span> <span class="n">the</span> <span class="n">requested</span> <span class="n">operation</span> <span class="n">on</span> <span class="n">the</span>
<span class="n">nn</span><span class="o">-</span><span class="n">bit</span> <span class="n">shared</span> <span class="n">cache</span> <span class="s2">&quot;cachename&quot;</span> <span class="k">as</span> <span class="n">the</span> <span class="n">nn</span><span class="o">-</span><span class="n">bit</span> <span class="n">VM</span>
<span class="n">cannot</span> <span class="n">verify</span> <span class="n">that</span> <span class="n">the</span> <span class="n">shared</span> <span class="n">memory</span> <span class="n">was</span> <span class="n">created</span> <span class="n">by</span> <span class="n">the</span> <span class="n">VM</span><span class="o">.</span>
</pre></div>
</dd>
<dd>
<p>On AIX and Linux 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="destroyallsnapshots-cache-utility"><code>destroyAllSnapshots</code> (Cache utility)</h3>
<dl>
<dd><strong>(AIX, Linux, z/OS only)</strong><div class="codehilite"><pre><span></span>-Xshareclasses:destroyAllSnapshots
</pre></div>
</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>(AIX, Linux, z/OS only)</strong><div class="codehilite"><pre><span></span>-Xshareclasses:destroySnapshot
</pre></div>
</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>
<div class="codehilite"><pre><span></span> -Xshareclasses:disableBCI
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:enableBCI
</pre></div>
<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.lnx.80.doc/diag/tools/shcpd_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>
<div class="codehilite"><pre><span></span> -Xshareclasses:expire=&lt;time_in_minutes&gt;
</pre></div>
<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="findaotmethods-cache-utility"><code>findAotMethods</code> (Cache utility)</h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:findAotMethods=&lt;method_specification&gt;
-Xshareclasses:findAotMethods=help
</pre></div>
<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>(AIX, Linux, z/OS only)</strong><div class="codehilite"><pre><span></span>-Xshareclasses:groupAccess
</pre></div>
</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 and Linux 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>
<div class="codehilite"><pre><span></span>JVMSHRC756W Failed to set group access permission on the shared cache
file as requested by the &#39;groupAccess&#39; sub-option
</pre></div>
</dd>
<dd>
<p>These messages can occur when non-persistent caches are used:</p>
<div class="codehilite"><pre><span></span>JVMSHRC759W Failed to set group access permission as requested by the
&#39;groupAccess&#39; sub-option on the semaphore control file associated
with shared class cache.
JVMSHRC760W Failed to set group access permission as requested by the
&#39;groupAccess&#39; sub-option on the shared memory control file associated
with shared class cache.
</pre></div>
</dd>
<dd>
<p>This message can occur in combination with the <code>snapshotCache</code> suboption:</p>
<div class="codehilite"><pre><span></span>JVMSHRC761W Failed to set group access permission as requested by the
&#39;groupAccess&#39; sub-option on the shared cache snapshot file.
</pre></div>
</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>
<div class="codehilite"><pre><span></span> -Xshareclasses:help
</pre></div>
<dl>
<dd>Lists all the command-line options.</dd>
</dl>
<h3 id="invalidateaotmethods-cache-utility"><code>invalidateAotMethods</code> (Cache utility)</h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:invalidateAotMethods=&lt;method_specification&gt;
-Xshareclasses:invalidateAotMethods=help
</pre></div>
<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="listallcaches-cache-utility"><code>listAllCaches</code> (Cache utility)</h3>
<dl>
<dd><strong>(AIX, Linux, z/OS only)</strong><div class="codehilite"><pre><span></span>-Xshareclasses:listAllCaches
</pre></div>
</dd>
<dd>
<p>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.</p>
</dd>
</dl>
<h3 id="mprotect"><code>mprotect</code></h3>
<dl>
<dd>AIX, z/OS 31-bit:<div class="codehilite"><pre><span></span>-Xshareclasses:mprotect=[default|all|none]
</pre></div>
</dd>
<dd>
<p>Linux, Windows:</p>
<div class="codehilite"><pre><span></span>-Xshareclasses:mprotect=[default|all|partialpagesonstartup|onfind|nopartialpages|none]
</pre></div>
</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 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 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 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 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>
<div class="codehilite"><pre><span></span> -Xshareclasses:modified=&lt;modified_context&gt;
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:name=&lt;name&gt;
</pre></div>
<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 AIX, Linux, and z/OS systems, you can specify <em>"%g"</em> in the cache name to insert the current group name.</dd>
</dl>
<h3 id="noaot"><code>noaot</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:noaot
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:noBootclasspath
</pre></div>
<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="nojitdata"><code>nojitdata</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:nojitdata
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:none
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:nonfatal
</pre></div>
<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.</dd>
</dl>
<h3 id="nonpersistent"><code>nonpersistent</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:nonpersistent
</pre></div>
<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 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>
</dl>
<h3 id="persistent"><code>persistent</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:persistent
</pre></div>
<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>
</dl>
<h3 id="printallstats-cache-utility"><code>printAllStats</code> (Cache utility)</h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:printAllStats
</pre></div>
<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. Every class is listed in chronological order with a reference to the location from which it was loaded. 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_out_printallstats.html">printAllStats utility</a>.</dd>
</dl>
<h3 id="printstats-cache-utility"><code>printStats</code> (Cache utility)</h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:printStats=&lt;data_type&gt;[+&lt;data_type&gt;]
</pre></div>
<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. 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="https://www.ibm.com/support/knowledgecenter/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/shrc_pd_out_printstats.html">printStats utility</a>.</dd>
</dl>
<h3 id="readonly"><code>readonly</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:readonly
</pre></div>
<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 and Linux 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>
<div class="codehilite"><pre><span></span> -Xshareclasses:reset
</pre></div>
<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>(AIX, Linux, z/OS only)</strong><div class="codehilite"><pre><span></span>-Xshareclasses:restoreFromSnapshot
</pre></div>
</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>
<div class="codehilite"><pre><span></span> -Xshareclasses:restrictClasspaths
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:revalidateAotMethods=&lt;method_specification&gt;
-Xshareclasses:revalidateAotMethods=help
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:silent
</pre></div>
<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>(AIX, Linux, z/OS only)</strong><div class="codehilite"><pre><span></span>-Xshareclasses:snapshotCache
</pre></div>
</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>
<div class="codehilite"><pre><span></span> -Xshareclasses:utilities
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:verbose
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:verboseAOT
</pre></div>
<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.vm.80.doc/docs/messages_intro.html">Messages Guide</a> for a list of the messages produced.</dd>
</dl>
<h3 id="verbosehelper"><code>verboseHelper</code></h3>
<div class="codehilite"><pre><span></span> -Xshareclasses:verboseHelper
</pre></div>
<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>
<div class="codehilite"><pre><span></span> -Xshareclasses:verboseIO
</pre></div>
<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>
<div class="codehilite"><pre><span></span><span class="o">&lt;</span><span class="n">packagename</span><span class="o">&gt;/&lt;</span><span class="n">classname</span><span class="o">&gt;[.&lt;</span><span class="n">methodname</span><span class="o">&gt;[(&lt;</span><span class="n">parameters</span><span class="o">&gt;)]]</span>
</pre></div>
<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>
<div class="codehilite"><pre><span></span><span class="o">{&lt;</span><span class="n">packagename</span><span class="o">/</span><span class="n">classname</span><span class="o">&gt;}[.{&lt;</span><span class="n">methodname</span><span class="o">&gt;}[({&lt;</span><span class="n">parameters</span><span class="o">&gt;})]]</span>
</pre></div>
<!--
{<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>
<div class="codehilite"><pre><span></span>(byte[] bytes, int offset, int length, Charset charset)
</pre></div>
<p>is</p>
<div class="codehilite"><pre><span></span>([BIILjava/nio/charset/Charset;)
</pre></div>
<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>
</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">
<!-- Separator -->
<img alt="" src="../cr/rule.png">
<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, 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
-->
<cite></cite>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<!--
* 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-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.abd7b172.js"></script>
<script>app.initialize({version:"0.17.2",url:{base:".."}})</script>
</body>
</html>