JDK-8204141 : [doc] Fix documentation about the -Xshare:on option
  • Type: Bug
  • Component: docs
  • Sub-Component: tools
  • Affected Version: 10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-05-31
  • Updated: 2018-09-12
  • Resolved: 2018-09-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11Fixed
Related Reports
Relates :  
Description
See JDK-8188109. -Xshare:on is for testing purposes only and may cause intermittent failures in production environments.

The following documentation should be fixed:

https://docs.oracle.com/javase/10/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4

"-Xshare:on" should be removed from all the command-line examples.

In addition, this sentence should be removed:

"Ensure that you have specified the option -Xshare:on or -Xshare:auto. If the option is not specified,-Xshare:auto is the default."

https://docs.oracle.com/javase/10/vm/class-data-sharing.htm#JSJVM-GUID-0260F857-A70E-4399-A1DF-A5766BE33285

"-Xshare:on
To enable class data sharing. If class data sharing can't be enabled, print an error message and exit."

Need to add the following warning to the end of the above paragraph

"-Xshare:on is for testing purposes only and may cause intermittent failures. This option should not be used in production environments."