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

[macos]: java.library.path is being set incorrectly

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b18
    • CPU:
      x86_64
    • OS:
      os_x
    • Verification:
      Verified

      Description

      ADDITIONAL SYSTEM INFORMATION :
      macOS Catalina 10.15.7

      openjdk version "15.0.2" 2021-01-19
      OpenJDK Runtime Environment (build 15.0.2+7-27)
      OpenJDK 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

      WARNING: Using incubator modules: jdk.incubator.jpackage
      15.0.2

      A DESCRIPTION OF THE PROBLEM :
      Previously on OS X java.library.path would include paths internal to the application.
      some.app/Contents/MacOS and some.app/Contents/app
      MacOS could probably be eliminated as 'app' is the jpackage supported way to include user files.
      However, these paths no longer appear included and instead external paths are.


      REGRESSION : Last worked in version 14

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Start an application with needed dylib's in the input directory to go to the app directory.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The native library will successfully load based on the java.library.path setting.
      ACTUAL -
      Exception in thread "main" java.lang.UnsatisfiedLinkError: no hp in java.library.path: /opt/ooRexx/lib/ooRexx:/Users/mjh/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
      at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
      at java.base/java.lang.System.loadLibrary(Unknown Source)
      at us.hall.osx.LogOut.<clinit>(LogOut.java:9)
      at us.hall.hp.common.LoaderLaunchStub.main(LoaderLaunchStub.java:59)

      The load fails because java.library.path no longer seems to include the internal 'app' directory.

      CUSTOMER SUBMITTED WORKAROUND :
      Setting the java.library.path as a startup option like...
      -Djava.library.path=$APPDIR

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              almatvee Alexander Matveev
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: