Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266851 Implement JEP 403: Strongly Encapsulate JDK Internals
  3. JDK-8267055

Release Note: JEP 403: Strongly Encapsulate JDK Internals

    XMLWordPrintable

    Details

      Description

      Strongly encapsulate all internal elements of the JDK, except for
      [critical internal APIs][crit] such as `sun.misc.Unsafe`.

      With this change, the `java` launcher option [`--illegal-access`][relax]
      is obsolete. If used on the command line it causes a warning message to
      be issued, and otherwise has no effect. Existing code that must use
      internal classes, methods, or fields of the JDK can still be made to work
      by using the [`--add-opens`][add-opens] launcher option, or the
      [`Add-Opens`][modjar] JAR-file manifest attribute, to open specific
      packages.

      For further details, please see [JEP 403](https://openjdk.java.net/jeps/403).

      [crit]: https://openjdk.java.net/jeps/260#Description
      [relax]: https://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation
      [add-opens]: https://openjdk.java.net/jeps/261#Breaking-encapsulation
      [modjar]: https://openjdk.java.net/jeps/261#Packaging:-Modular-JAR-files

        Attachments

          Activity

            People

            Assignee:
            mr Mark Reinhold
            Reporter:
            mr Mark Reinhold
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: