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

Improve UnsatisfiedLinkError error message to include dlopen error details

    XMLWordPrintable

Details

    Backports

      Description

        When trying to load a x64 lib on macOS aarch64 one got previously this detailed message before JDK-8275703:

        java.lang.UnsatisfiedLinkError: /testing/jco3/macOsx64/libsapjco3.dylib: dlopen(/testing/jco3/macOsx64/libsapjco3.dylib, 1): no suitable image found. Did find:
                        /testing/jco3/macOsx64/libsapjco3.dylib: mach-o, but wrong architecture
                        /testing/jco3/macOsx64/libsapjco3.dylib: mach-o, but wrong architecture [in thread "main"]

        After JDK-8275703, the error message does not include the details:
        java.lang.UnsatisfiedLinkError: Can't load library: /testing/jco3/macOsx64/libsapjco3.dylib [in thread "main"]

        The error details are useful to help diagnosing user's error like mismatched target architecture.

        Attachments

          Issue Links

            Activity

              People

                mbaesken Matthias Baesken
                mchung Mandy Chung
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: