JEP draft: Prepare to Restrict The Use of JNI

Florian Weimer fweimer at redhat.com
Wed Aug 23 12:57:50 UTC 2023


* Ron Pressler:

> In other words, our proposal is: In the future, code that uses JNI
> will run only if unsafe native access is enabled, and to prepare for
> that future, JDK 22 should spotlight the use of JNI with
> warnings. We've published a draft JEP that explains why using JNI is
> unsafe and describes the warnings [3].

Is there a practical difference between the explicit flag, and tracking
and reporting taint flags in crash dumps (and perhaps other places in
the future)?

If the application does not work with JNI (or FFM for that matter), then
the user has to restart with the flag, so it's pretty much like a manual
taint flag.

Thanks,
Florian



More information about the jdk-dev mailing list