Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8288283

Add JNI_VERSION_19 to jni.h and JNI spec

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 19
    • hotspot
    • None
    • minimal
    • GetVersion has returned JNI_VERSION_10 since Java 10. It's possible, but unlikely, that there is native code that will fail if the JNI version is newer than JNI_VERSION_10.
    • Java API
    • SE

      Summary

      Update the Java Native Interface (JNI) spec to define JNI_VERSION_19 and change the JNI function GetVersion to return this version.

      Problem

      JNI is updated in Java 19 to define a new function IsVirtualThread. The JNI function GetVersion needs to be updated to return a version for the updated native interface.

      Solution

      • Update the JNI spec to define the constant JNI_VERSION_19.

      • Update the function GetVersion to specify that it returns JNI_VERSION_19.

      • Update the table of the JNI version "included" in each release Java SE 11 to 19.

      Specification

      A zip file with the diffs is attached. The changes are limited to the "Version Information" section:

      • The "Version Constants" sub-section is updated to define JNI_VERSION_19 with the value 0x00130000.

      • The function GetVersion is changed to return JNI_VERSION_19 and the table of the JNI version included in each release is also updated.

            alanb Alan Bateman
            alanb Alan Bateman
            Daniel Daugherty, David Holmes, Iris Clark, Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: