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

Simon Nash simon at cjnash.com
Sat Sep 2 07:06:25 UTC 2023


On 01/09/2023 20:45, Ron Pressler wrote:
>> On 1 Sep 2023, at 19:01, Glavo <zjx001202 at gmail.com> wrote:
>>
>> You keep emphasizing "end user", trying to prove that you are giving more power to the end user.
>> Is this real? It doesn't look like it. You are just forcing more obligations on them.
> Quite the opposite! An application developer (to clarify yet again, the user we’re talking about is the application developer as opposed to the library developer; the end user *of the application* obviously need not even see any of these flags)
As I pointed out in my earlier message, although the end user of the application does not need to specify the flag, they do see the scary warning written to 
stderr when the flag is not present. This will happen when an a older version of an application that uses JNI is run on a newer version of the JDK.

This will scare these end users and is likely to reinforce the incorrect perception that Java is unsafe and Java-based applications should be avoided.

One way to avoid this issue would be to only show the warning for applications built on JDK 22 and above that don't specify the new flag. Applications built 
using older versions of Java would not show the warning.

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20230902/31f0e3f8/attachment.htm>


More information about the jdk-dev mailing list