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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 17
    • tools
    • None
    • b26

      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

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

              Created:
              Updated:
              Resolved: