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

Special property jdk.boot.class.path.append should not default to empty string

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 19
    • hotspot
    • None
    • behavioral
    • low
    • This property can only be read using a JVMTI API. So. it's likely that there are only a small number of programs that read the property and depend on its value always being non-null.
    • System or security property
    • JDK

      Summary

      Special property jdk.boot.class.path.append needs to be initialized to NULL and JVMTI_GetSystemProperty() should return a status of JVMTI_ERROR_NOT_AVAILABLE if the property value is NULL.

      Problem

      Property jdk.boot.class.path.append is currently initialized to "" and JVMTI_GetSystemProperty() returns a status of JVMTI_ERROR_NONE and a property value of "".

      Solution

      Change the implementation of jdk.boot.class.path.append to initialize it to NULL. See https://github.com/openjdk/jdk/pull/6868.

      Specification

      https://openjdk.java.net/jeps/261 A related option, -Xbootclasspath/a, allows files and directories to be appended to the default bootstrap class path. This option, and the related API in the java.lang.instrument package, is sometimes used by instrumentation agents, so for compatibility it is still supported at run time. Its value, if specified, is reported via the JDK-specific system property jdk.boot.class.path.append. This option can be passed to the command-line launcher, java, and also to the JNI invocation API.

      This documents that the intent was that if Xbootclasspath/a is not specified then its value can't be reported by reading property jdk.boot.class.path.append.

      Also see discussion in: https://bugs.openjdk.java.net/browse/JDK-8224791

            hseigel Harold Seigel (Inactive)
            dholmes David Holmes
            Alan Bateman, David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: