Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8268725

jshell does not support the --enable-native-access option

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 17
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
      None

      Description

      Java 17 supports the option `--enable-native-access` which allows modules to use certain new APIs from Project Panama. In order to use jshell interactively with these modules, the classes defined by jshell need this permission.

      I suggest that both the /env comment and the jshell command line accept --enable-native-access (with no argument) to unlock native access.

      Workaround: Use `-R--enable-native-access=ALL-UNNAMED` on the jshell command line.

      For an example, please see http://cr.openjdk.java.net/~jrose/panama/argv-example.jshell

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jlahoda Jan Lahoda
              Reporter:
              jrose John Rose
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: