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

VM argument "-agentlib" should use "-Djava.library.path" to find its library.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • hotspot
    • None
    • x86
    • os_x

      We can currently set "-Djava.library.path" or DYLD_LIBRARY_PATH/LD_LIBRARY_PATH to have "System.loadLibrary()" find its library, but "-agentlib" only uses DYLD_LIBRARY_PATH/LD_LIBRARY_PATH and ignores "-Djava.library.path"

      Java VM should be consistent and allow platform independent way, ie. "-Djava.library.path" of specifying where to look for libraries it needs.

      In addition, DYLD_LIBRARY_PATH on Mac is not ideal to use (meant for testing) and subject to control by SIP (Apple's System Integrity Protection), which requires one to use bypass flags if one wants it exported to a subshell (see INTJDK-7621718 and INTJDK-7623593)

            Unassigned Unassigned
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: