Summary
The --enable-native-access command line option is added to JShell.
Problem
JShell does not have the --enable-native-access command line option, so it is more difficult to experiment with methods that require it.
Solution
JShell will accept the --enable-native-access command line option. Unlike the runtime (java launcher) option, it will not accept any parameter. The motivation is that while JShell snippets run currently in an unnamed module, JShell does not advertise this fact. JShell generally does not rely on the user's knowledge of the module in which the snippets run. This is consistent with the existing --add-exports option, which also does not accept the target module, and only accepts the source module and package (--add-exports <module>/<package>).
Specification
JShell will have the --enable-native-access command line option, without parameters. This will enable the restricted methods for ordinary JShell snippets, by passing --enable-native-access=ALL-UNNAMED to the runner agent.
- csr of
- 
                    JDK-8268725 jshell does not support the --enable-native-access option -           
- Resolved
 
-