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

More clean up on NativeLibraries just for JNI library use

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • core-libs
    • None

      More clean up in NativeLibraryImpl and Unloader that are used for JNI library only. RawNativeLibraries implements its own native load and unload methods.

      This is to follow up the feedback on NativeLibraries::load:
         https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-February/086285.html

      NativeLibraries::load calls JVM_LoadLibrary which will throw UnsatisfiedLinkError if it fails to load a native library and throwExceptionIfFail is true. The return value is important for the JNI case
      and calling System::loadLibrary on the system with dynamic linker cache (Big Sur) where throwExceptionIfFail is false. JNI_TRUE return value for non-JNI case (i.e. raw library library mechanism) is confusing to the readers. That should be fixed. We should further clean up and have RawNativeLibraries to have its own native load and unload methods.

            mchung Mandy Chung (Inactive)
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: