Re:FFM (Foreign Function and Memory API) Goes Final
by josephcsible on Monday December 11, 2023 @02:33PM
(#38604360)
> an executable JAR, i.e. an application, can grant such permission in its manifest
No it can't. If it would, then the change indeed wouldn't be a problem. Oracle has removed --illegal-access=permit completely, and --add-opens doesn't let you specify wildcards.
Re:FFM (Foreign Function and Memory API) Goes Final
by pron on Monday December 11, 2023 @06:18PM
(#38606831)
The question I answered was about --enable-native-access, not --add-opens. --add-opens indicates an actual problem in the program that has to be fixed, so of course we don't allow wildcards. You can still specify that in the manifest even without wildcards, though.
2. The last word is given to the application, and the point is that libraries must not make decisions that have a global impact on behalf of the application. That's why an executable JAR, i.e. an application, can grant such permission in its manifest but library JARs cannot.
See more here: https://openjdk.org/jeps/8305968, https://openjdk.org/jeps/8307341