mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8236225: Remove expired flags in JDK 17
8256717: Expire the long term obsoleted VM flags Reviewed-by: coleenp, kvn
This commit is contained in:
parent
4d6f318153
commit
1e77896838
7 changed files with 128 additions and 223 deletions
|
@ -22,7 +22,7 @@
|
|||
.\"t
|
||||
.\" Automatically generated by Pandoc 2.3.1
|
||||
.\"
|
||||
.TH "JAVA" "1" "2020" "JDK 16" "JDK Commands"
|
||||
.TH "JAVA" "1" "2020" "JDK 17" "JDK Commands"
|
||||
.hy
|
||||
.SH NAME
|
||||
.PP
|
||||
|
@ -181,7 +181,7 @@ with new values added and old values removed.
|
|||
You\[aq]ll get an error message if you use a value of \f[I]N\f[R] that is
|
||||
no longer supported.
|
||||
The supported values of \f[I]N\f[R] are the current Java SE release
|
||||
(\f[CB]16\f[R]) and a limited number of previous releases, detailed in the
|
||||
(\f[CB]17\f[R]) and a limited number of previous releases, detailed in the
|
||||
command\-line help for \f[CB]javac\f[R], under the \f[CB]\-\-source\f[R] and
|
||||
\f[CB]\-\-release\f[R] options.
|
||||
.RE
|
||||
|
@ -1120,72 +1120,6 @@ Updates \f[I]module\f[R] to open \f[I]package\f[R] to
|
|||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-\-illegal\-access=\f[R]\f[I]parameter\f[R]
|
||||
When present at run time, \f[CB]\-\-illegal\-access=\f[R] takes a keyword
|
||||
\f[I]parameter\f[R] to specify a mode of operation:
|
||||
.RS
|
||||
.RS
|
||||
.PP
|
||||
\f[B]Note:\f[R] This option will be removed in a future release.
|
||||
.RE
|
||||
.IP \[bu] 2
|
||||
\f[CB]permit\f[R]: This mode opens each package in each module in the
|
||||
run\-time image to code in all unnamed modules ( such as code on the
|
||||
class path), if that package existed in JDK 8.
|
||||
This enables both static access, (for example, by compiled bytecode, and
|
||||
deep reflective access) through the platform\[aq]s various reflection
|
||||
APIs.
|
||||
The first reflective\-access operation to any such package causes a
|
||||
warning to be issued.
|
||||
However, no warnings are issued after the first occurrence.
|
||||
This single warning describes how to enable further warnings.
|
||||
This mode is the default for the current JDK but will change in a future
|
||||
release.
|
||||
.IP \[bu] 2
|
||||
\f[CB]warn\f[R]: This mode is identical to \f[CB]permit\f[R] except that a
|
||||
warning message is issued for each illegal reflective\-access operation.
|
||||
.IP \[bu] 2
|
||||
\f[CB]debug\f[R]: This mode is identical to \f[CB]warn\f[R] except that both
|
||||
a warning message and a stack trace are issued for each illegal
|
||||
reflective\-access operation.
|
||||
.IP \[bu] 2
|
||||
\f[CB]deny\f[R]: This mode disables all illegal\-access operations except
|
||||
for those enabled by other command\-line options, such as
|
||||
\f[CB]\-\-add\-opens\f[R].
|
||||
This mode will become the default in a future release.
|
||||
.PP
|
||||
The default mode, \f[CB]\-\-illegal\-access=permit\f[R], is intended to
|
||||
make you aware of code on the class path that reflectively accesses any
|
||||
JDK\-internal APIs at least once.
|
||||
To learn about all such accesses, you can use the \f[CB]warn\f[R] or the
|
||||
\f[CB]debug\f[R] modes.
|
||||
For each library or framework on the class path that requires illegal
|
||||
access, you have two options:
|
||||
.IP \[bu] 2
|
||||
If the component\[aq]s maintainers have already released a fixed version
|
||||
that no longer uses JDK\-internal APIs then you can consider upgrading
|
||||
to that version.
|
||||
.IP \[bu] 2
|
||||
If the component still needs to be fixed, then you can contact its
|
||||
maintainers and ask them to replace their use of JDK\-internal APIs with
|
||||
the proper exported APIs.
|
||||
.PP
|
||||
If you must continue to use a component that requires illegal access,
|
||||
then you can eliminate the warning messages by using one or more
|
||||
\f[CB]\-\-add\-opens\f[R] options to open only those internal packages to
|
||||
which access is required.
|
||||
.PP
|
||||
To verify that your application is ready for a future version of the
|
||||
JDK, run it with \f[CB]\-\-illegal\-access=deny\f[R] along with any
|
||||
necessary \f[CB]\-\-add\-opens\f[R] options.
|
||||
Any remaining illegal\-access errors will most likely be due to static
|
||||
references from compiled code to JDK\-internal APIs.
|
||||
You can identify those by running the \f[B]jdeps\f[R] tool with the
|
||||
\f[CB]\-\-jdk\-internals\f[R] option.
|
||||
For performance reasons, the current JDK does not issue warnings for
|
||||
illegal static\-access operations.
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-\-limit\-modules\f[R] \f[I]module\f[R][\f[CB],\f[R]\f[I]module\f[R]...]
|
||||
Specifies the limit of the universe of observable modules.
|
||||
.RS
|
||||
|
@ -3937,6 +3871,68 @@ future JDK release.
|
|||
They\[aq]re still accepted and acted upon, but a warning is issued when
|
||||
they\[aq]re used.
|
||||
.TP
|
||||
.B \f[CB]\-\-illegal\-access=\f[R]\f[I]parameter\f[R]
|
||||
When present at run time, \f[CB]\-\-illegal\-access=\f[R] takes a keyword
|
||||
\f[I]parameter\f[R] to specify a mode of operation:
|
||||
.RS
|
||||
.RS
|
||||
.PP
|
||||
\f[B]Note:\f[R] This option will be removed in a future release.
|
||||
.RE
|
||||
.IP \[bu] 2
|
||||
\f[CB]permit\f[R]: This mode opens each package in each module in the
|
||||
run\-time image to code in all unnamed modules ( such as code on the
|
||||
class path), if that package existed in JDK 8.
|
||||
This enables both static access, (for example, by compiled bytecode, and
|
||||
deep reflective access) through the platform\[aq]s various reflection
|
||||
APIs.
|
||||
The first reflective\-access operation to any such package causes a
|
||||
warning to be issued.
|
||||
However, no warnings are issued after the first occurrence.
|
||||
This single warning describes how to enable further warnings.
|
||||
.IP \[bu] 2
|
||||
\f[CB]warn\f[R]: This mode is identical to \f[CB]permit\f[R] except that a
|
||||
warning message is issued for each illegal reflective\-access operation.
|
||||
.IP \[bu] 2
|
||||
\f[CB]debug\f[R]: This mode is identical to \f[CB]warn\f[R] except that both
|
||||
a warning message and a stack trace are issued for each illegal
|
||||
reflective\-access operation.
|
||||
.IP \[bu] 2
|
||||
\f[CB]deny\f[R]: This mode disables all illegal\-access operations except
|
||||
for those enabled by other command\-line options, such as
|
||||
\f[CB]\-\-add\-opens\f[R].
|
||||
This mode is the default.
|
||||
.PP
|
||||
If your application does not work with the default mode of
|
||||
\f[CB]\-\-illegal\-access=deny\f[R] then you can learn more about what is
|
||||
going on with the \f[CB]warn\f[R] and \f[CB]debug\f[R] modes.
|
||||
For each library or framework on the class path that requires illegal
|
||||
access, you have two options:
|
||||
.IP \[bu] 2
|
||||
If the component\[aq]s maintainers have already released a fixed version
|
||||
that no longer uses JDK\-internal APIs then you can consider upgrading
|
||||
to that version.
|
||||
.IP \[bu] 2
|
||||
If the component still needs to be fixed, then you can contact its
|
||||
maintainers and ask them to replace their use of JDK\-internal APIs with
|
||||
the proper exported APIs.
|
||||
.PP
|
||||
If you must continue to use a component that requires illegal access,
|
||||
then you can eliminate the warning messages by using one or more
|
||||
\f[CB]\-\-add\-opens\f[R] options to open only those internal packages to
|
||||
which access is required.
|
||||
.PP
|
||||
To verify that your application is ready for a future version of the
|
||||
JDK, run it with \f[CB]\-\-illegal\-access=deny\f[R] along with any
|
||||
necessary \f[CB]\-\-add\-opens\f[R] options.
|
||||
Any remaining illegal\-access errors will most likely be due to static
|
||||
references from compiled code to JDK\-internal APIs.
|
||||
You can identify those by running the \f[B]jdeps\f[R] tool with the
|
||||
\f[CB]\-\-jdk\-internals\f[R] option.
|
||||
For performance reasons, the current JDK does not issue warnings for
|
||||
illegal static\-access operations.
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-Xfuture\f[R]
|
||||
Enables strict class\-file format checks that enforce close conformance
|
||||
to the class\-file format specification.
|
||||
|
@ -4006,6 +4002,52 @@ The default value is 2.
|
|||
Use the option \f[CB]\-XX:MinRAMPercentage\f[R] instead.
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:+UseBiasedLocking\f[R]
|
||||
Enables the use of biased locking.
|
||||
Some applications with significant amounts of uncontended
|
||||
synchronization may attain significant speedups with this flag enabled,
|
||||
but applications with certain patterns of locking may see slowdowns.
|
||||
.RS
|
||||
.PP
|
||||
By default, this option is disabled.
|
||||
.RE
|
||||
.SH OBSOLETE JAVA OPTIONS
|
||||
.PP
|
||||
These \f[CB]java\f[R] options are still accepted but ignored, and a
|
||||
warning is issued when they\[aq]re used.
|
||||
.PP
|
||||
None in JDK 17.
|
||||
.SH REMOVED JAVA OPTIONS
|
||||
.PP
|
||||
These \f[CB]java\f[R] options have been removed in JDK 17 and using them
|
||||
results in an error of:
|
||||
.RS
|
||||
.PP
|
||||
\f[CB]Unrecognized\ VM\ option\f[R] \f[I]option\-name\f[R]
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:+UseMembar\f[R]
|
||||
Enabled issuing membars on thread\-state transitions.
|
||||
This option was disabled by default on all platforms except ARM servers,
|
||||
where it was enabled.
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:MaxPermSize=\f[R]\f[I]size\f[R]
|
||||
Sets the maximum permanent generation space size (in bytes).
|
||||
This option was deprecated in JDK 8 and superseded by the
|
||||
\f[CB]\-XX:MaxMetaspaceSize\f[R] option.
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:PermSize=\f[R]\f[I]size\f[R]
|
||||
Sets the space (in bytes) allocated to the permanent generation that
|
||||
triggers a garbage collection if it\[aq]s exceeded.
|
||||
This option was deprecated in JDK 8 and superseded by the
|
||||
\f[CB]\-XX:MetaspaceSize\f[R] option.
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:+TraceClassLoading\f[R]
|
||||
Enables tracing of classes as they are loaded.
|
||||
By default, this option is disabled and classes aren\[aq]t traced.
|
||||
|
@ -4053,62 +4095,13 @@ The replacement Unified Logging syntax is
|
|||
\f[CB]\-Xlog:class+loader+constraints=info\f[R].
|
||||
See \f[B]Enable Logging with the JVM Unified Logging Framework\f[R].
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:+UseBiasedLocking\f[R]
|
||||
Enables the use of biased locking.
|
||||
Some applications with significant amounts of uncontended
|
||||
synchronization may attain significant speedups with this flag enabled,
|
||||
but applications with certain patterns of locking may see slowdowns.
|
||||
.RS
|
||||
.PP
|
||||
By default, this option is disabled.
|
||||
.RE
|
||||
.SH OBSOLETE JAVA OPTIONS
|
||||
.PP
|
||||
These \f[CB]java\f[R] options are still accepted but ignored, and a
|
||||
warning is issued when they\[aq]re used.
|
||||
.TP
|
||||
.B \f[CB]\-XX:+UseMembar\f[R]
|
||||
Enabled issuing membars on thread\-state transitions.
|
||||
This option was disabled by default on all platforms except ARM servers,
|
||||
where it was enabled.
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:MaxPermSize=\f[R]\f[I]size\f[R]
|
||||
Sets the maximum permanent generation space size (in bytes).
|
||||
This option was deprecated in JDK 8 and superseded by the
|
||||
\f[CB]\-XX:MaxMetaspaceSize\f[R] option.
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:PermSize=\f[R]\f[I]size\f[R]
|
||||
Sets the space (in bytes) allocated to the permanent generation that
|
||||
triggers a garbage collection if it\[aq]s exceeded.
|
||||
This option was deprecated in JDK 8 and superseded by the
|
||||
\f[CB]\-XX:MetaspaceSize\f[R] option.
|
||||
.RS
|
||||
.RE
|
||||
.SH REMOVED JAVA OPTIONS
|
||||
.PP
|
||||
These \f[CB]java\f[R] options have been removed in JDK 15 and using them
|
||||
results in an error of:
|
||||
.RS
|
||||
.PP
|
||||
\f[CB]Unrecognized\ VM\ option\f[R] \f[I]option\-name\f[R]
|
||||
.RE
|
||||
.TP
|
||||
.B \f[CB]\-XX:+UseParallelOldGC\f[R]
|
||||
Enables the use of the parallel garbage collector for full GCs.
|
||||
By default, this option is disabled.
|
||||
Enabling it automatically enables the \f[CB]\-XX:+UseParallelGC\f[R]
|
||||
option.
|
||||
.RS
|
||||
.RE
|
||||
.PP
|
||||
For the lists and descriptions of options removed in previous releases
|
||||
see the \f[I]Removed Java Options\f[R] section in:
|
||||
.IP \[bu] 2
|
||||
\f[B]Java Platform, Standard Edition Tools Reference, Release 16\f[R]
|
||||
[https://docs.oracle.com/en/java/javase/16/docs/specs/man/java.html]
|
||||
.IP \[bu] 2
|
||||
\f[B]Java Platform, Standard Edition Tools Reference, Release 15\f[R]
|
||||
[https://docs.oracle.com/en/java/javase/15/docs/specs/man/java.html]
|
||||
.IP \[bu] 2
|
||||
|
@ -4794,6 +4787,10 @@ T}
|
|||
.TE
|
||||
.SS Convert Runtime Logging Flags to Xlog
|
||||
.PP
|
||||
These legacy flags are no longer recognized and will cause an error if
|
||||
used directly.
|
||||
Use their unified logging equivalent instead.
|
||||
.PP
|
||||
.TS
|
||||
tab(@);
|
||||
lw(15.0n) lw(20.2n) lw(34.7n).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue