[External] : Re: JEP draft: Prepare to Restrict The Use of JNI

Attila Kelemen attila.kelemen85 at gmail.com
Tue Aug 29 11:03:59 UTC 2023


>
>
> How, today, can a user know if they use JNI?
> The point is to make it impossible for a user to be unaware of any JNI
> uses which *at the very minimum* requires you to declare it in the command
> line.
>
> Although *I absolutely* agree that it should also be added to the
> module-info, so instead of having to specify every module that uses JNI in
> the flag, you could only specify the Main module, and in there it's
> module-info will open the JNI usage for every module.
>
> But i don't think there is a way to make sure the users are aware of JNI
> usage without at least 1 flag
>

Yes, and now many people proposed basically the same thing, that the main
module should be able to declare it. That would actually satisfy Ron's
question of "how to better offer strong encapsulation by default". It is
clear from this thread that the ability to declare it in the main module
would satisfy a lot of people, and I can't imagine someone complaining that
they don't want to be able to do that. So, it would be just a win-win.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20230829/29e58f5d/attachment.htm>


More information about the jdk-dev mailing list