Scenario 3, OpenOffice/LibreOffice (Re: Minor thoughts (Re: [External] : Re: JEP draft: Prepare to Restrict The Use of JNI

Ron Pressler ron.pressler at oracle.com
Tue Sep 5 11:17:34 UTC 2023



> On 5 Sep 2023, at 11:03, Rony G. Flatscher <Rony.Flatscher at wu.ac.at> wrote:
> 
> OpenOffice and its fork LibreOffice are original C++ applications.
> 
> The German company Star created a portable C++ framework in order to become able to create their end-user tools (word processor, later spreadsheet etc.). It got bought by Sun which ordered the team to create Java APIs for the package. AOO/LO therefore have a need to interact with the JRE (the Java/OpenJDK installation).
> 
> Among other things components in Java can be created, the scripting framework is implemented in Java (it predates the javax.script package).
> 
> There is an ooRexx implementation for the AOO/LO Java scripting framework such that students become able to also create programs and take advantage of that infrastructure in addition. Here slides that teach the business administration students programming AOO/LO: <https://wi.wu.ac.at/rgf/wu/lehre/autojava/material/foils/240_AutoJava_AOO_LO_V03.pdf>.
> 
> There is no "Java application author" that would be able to control that "easy" flag.
> 
> If the user of AOO/LO gets to see that warning it would be a message that in effect Java/OpenJDK is not safe as Java/OpenJDK gives a warning about its use and if an error gets eventually thrown …

Thank you!

None of these use cases will require the user of the application to see any warning messages or configure the Java runtime. Even when a shared runtime is used (what you insist on calling a JRE) the application needs to create an instance of the JVM somehow. I believe that in most of these situations it uses something called the JNI Invocation API, which has its own section in the JEP. When they create an internal instance of the JVM, they must also configure it, and they can configure it to disable the warning. The author of such applications is the direct user of Java, and they still have full control.

I’ve also looked at some other material of yours where something called NetRexx is used. In that case, too, users of NetRexx will not need to see any warning or provide any flag because the interpreter is an executable JAR. As the JEP says, the executable JAR can disable the warning with no further action from the user.

Does that address your concerns?

— Ron



More information about the jdk-dev mailing list