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

Update JNI Spec w.r.t. VM implementation-specific long form options

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Withdrawn
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      The CSR is for adding documentation of existing functionality. It does not change behavior.
    • Interface Kind:
      Other
    • Scope:
      SE

      Description

      Summary

      Add text to Chapter 5 of the JNI Spec that clarifies how to pass long-form options, such as --add-exports, to JNI_CreateJavaVM().

      Problem

      The JNI Spec needs to tell users how to correctly pass long-form options to the JVM when using the JNI_CreateJavaVM() API.

      Solution

      Add the needed text to the JNI_CreateJavaVM() description in chapter 5 of the JNI Spec:

      Specification

      The detailed changes are to add the following paragraph to the description of JNI_CreateJavaVM in chapter 5 of the JNI Spec. The paragraph would be placed before the example that is currently in the Spec.

      The proposed new paragraph is:

      Also, the VM accepts relevant long-form options provided that the option arguments are separated from their option names by '=' and there is no intervening white space. For example, to export java.management/sun.management to ALL-UNNAMED, the option string "--add-exports=java.management/sun.management=ALL-UNNAMED" should be used.

      This paragraph will be deleted:

      The module related options, --add-reads, --add-exports, --add-opens, --add-modules, --limit-modules, --module-path, --patch-module, and --upgrade-module-path must be passed as option strings using their "option=value" format instead of their "option value" format. (Note the required = between "option" and "value".) For example, to export java.management/sun.management to ALL-UNNAMED pass option string "--add-exports=java.management/sun.management=ALL-UNNAMED".

      The JDK-13 description of JNI_CreateJavaVM in the JNI Spec can be found here: https://docs.oracle.com/en/java/javase/13/docs/specs/jni/invocation.html#jni_createjavavm

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              hseigel Harold Seigel
              Reviewed By:
              Lois Foltan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: