[External] : Re: JEP draft: Prepare to Restrict The Use of JNI
Ron Pressler
ron.pressler at oracle.com
Tue Aug 22 18:08:24 UTC 2023
> On 22 Aug 2023, at 14:48, Peter Tribble <peter.tribble at gmail.com> wrote:
>
> Hi,
>
> Just a couple of thoughts as a JNI user:
>
> Using the same flag as FFM makes it look the same, but it would appear
> that it's then not possible to disable JNI but enable FFM. I can imagine
> that I would want to apply different policies to the old way and new way.
> As proposed, if I enable FFM then JNI can run riot without my knowledge.
Ok, let us think about that.
>
> Does the manifest element only work if present in the jar file directly called
> via java -jar, or would it be taken if declared in a secondary jar file listed
> in the Class-Path for that first jar?
It only works for a JAR that’s used with -jar, just like the other “integrity” manifest attributes, `Add-Opens` and `Add-Exports`.
— Ron
More information about the jdk-dev
mailing list