JEP draft: Prepare to Restrict The Use of JNI

Ron Pressler ron.pressler at oracle.com
Mon Aug 28 20:53:20 UTC 2023



> On 28 Aug 2023, at 18:01, Constantin Christoph <4evnyuij at gmail.com> wrote:
> 
> I am very aware of what is being changed here; I know that JNI will still be around, and be usable. However, the restrictions that are going to be imposed on using it won't exactly make it easier to use, and require even more boilerplate setup for an end user to set up an app or library. I know that launchers exist, and I know that the manifest can also permit the usage of JNI, but if it would solve the issue, I wouldn't be here talking about it. The issue at hand is that the usage of JNI in the future will require the end user of a library to either make a startup script (which is not always the default procedure for smaller applications), or to add another entry to their manifest, both options often require a bit of rethinking about how they should build their project. It's not an easy solution, and it certainly makes things more annoying if a library just wants to use some more advanced features.


To use *any* library an application must either add something to the command line or to the manifest (or do something more complicated) because that’s how Java works. How that can be an unusual burden to a Java application?

— Ron


More information about the jdk-dev mailing list