Will we need to use the --enable-native-access option to enable JNI in the future?
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Sep 21 21:01:06 UTC 2021
On 21/09/2021 21:14, Glavo wrote:
> In the end, I'd like to conclude with my expectations and suggestions.
> I hope these suggestions can help the development of Panama.
>
> * Better integration of Panama and JPMS (maybe use `/native module
> {}`/ to declare module in module-info,java)
> * Allow --enable-native-access to pass between modules (maybe like
> `/opens native to <module name>;/` declare in module-info.java)
> * To allow --enable-native-access to be declared in manifest.mf
> (maybe /EnableNativeAccess /entry)
> * Enable module native access at runtime
>
I think I agree with all the points above (and these were very much on
the roadmap, they are just not done yet, as some of them requires
additional exploration).
>
> * In the far future, restrict JNI (If Panama and JPMS can be better
> integrated, JNI may be able to reuse it)
>
this is also something that we'd like to get to, although, as I said, we
have to play more carefully there (e.g. maybe first warn, then error).
>
> * Use clearer, non misleading names
>
I think I tend to agree with this too. Naming is hard. I think we
probably over-rotated towards "native", maybe something that has to do
with "restricted" which is the word the API uses would be better, but I
don't have any clever idea right now.
> Finally, thank you again.
Thank you for sharing your side of the story. I think overall, the
things you propose, while not immediately available right now, are part
of the solution that we'd like to offer at some point.
Maurizio
>
> (If I want to ask a question about JPMS, which mailing list should I
> go to? Is jdk-dev?)
More information about the panama-dev
mailing list