-
Enhancement
-
Resolution: Fixed
-
P3
-
22
The Foreign Function & Memory API (FFM API) introduces the notion of "restricted methods". These methods are part of the Java SE API, but calling them will result in a runtime warning (the warning might become an exception at some point in the future).
To disable the warning, clients have to grant native permissions to a selected list of modules, using the --enable-native-access command line flag.
When working with an executable jars, it is sometimes necessary to specify, via custom manifest attributes, some options that are necessary for the application to work correctly. For instance, the "Add-Opens" attribute can be used to open a package for reflective access.
It would be useful if some support would also be provided for "--enable-native-access" in the form of an attribute Enable-Native-Access=true/false, which if set is equivalent to passing "--enable-native-access=ALL-UNNAMED" to the Java launcher.
Note that, since executable jars are only supported in classpath mode, it is not necessary to add a more complex manifest attribute which allows developers to explicitly list module names.
To disable the warning, clients have to grant native permissions to a selected list of modules, using the --enable-native-access command line flag.
When working with an executable jars, it is sometimes necessary to specify, via custom manifest attributes, some options that are necessary for the application to work correctly. For instance, the "Add-Opens" attribute can be used to open a package for reflective access.
It would be useful if some support would also be provided for "--enable-native-access" in the form of an attribute Enable-Native-Access=true/false, which if set is equivalent to passing "--enable-native-access=ALL-UNNAMED" to the Java launcher.
Note that, since executable jars are only supported in classpath mode, it is not necessary to add a more complex manifest attribute which allows developers to explicitly list module names.