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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 18
    • tools
    • None
    • b26

    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

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

              Dates

                Created:
                Updated:
                Resolved: