-
Sub-task
-
Resolution: Delivered
-
P3
-
16
-
Verified
Strongly encapsulate all internal elements of the JDK by default, except
for [critical internal APIs][crit] such as `sun.misc.Unsafe`. Allow end
users to choose the relaxed strong encapsulation that has been the
default since JDK 9.
With this change, the default value of the launcher option
[`--illegal-access`][relax] is now `deny` rather than `permit`. As a
consequence, existing code that uses most internal classes, methods, or
fields of the JDK will fail to run. Such code can be made to run on
JDK 16 by specifying `--illegal-access=permit`. That option will,
however, be removed in a future release.
For further details, please see [JEP 396](https://openjdk.java.net/jeps/396).
[crit]: https://openjdk.java.net/jeps/260#Description
[relax]: https://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation
for [critical internal APIs][crit] such as `sun.misc.Unsafe`. Allow end
users to choose the relaxed strong encapsulation that has been the
default since JDK 9.
With this change, the default value of the launcher option
[`--illegal-access`][relax] is now `deny` rather than `permit`. As a
consequence, existing code that uses most internal classes, methods, or
fields of the JDK will fail to run. Such code can be made to run on
JDK 16 by specifying `--illegal-access=permit`. That option will,
however, be removed in a future release.
For further details, please see [JEP 396](https://openjdk.java.net/jeps/396).
[crit]: https://openjdk.java.net/jeps/260#Description
[relax]: https://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation