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

GetJREPath() JLI function fails to locate libjava.so if not standard Java launcher is used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b08
    • OS:
      linux_ubuntu

      Description

      I have put together an hello world application, with a jarfile. If I jpackage it with the following command line:

      ```
      $ jpackage --type app-image --name HelloWorld --input out/artifacts/jpackage_test_jar --main-jar jpackage-test.jar --dest output
      ```

      Everything works correctly, and launching the generated app prints "Hello world":

      ```
      $ output/HelloWorld/bin/HelloWorld
      Hello world!
      ```

      However, if the destination directory contains "bin" (even as a nested subfolder), there are issues. Here's the jextract command line:

      ```
      $ jpackage --type app-image --name HelloWorld --input out/artifacts/jpackage_test_jar --main-jar jpackage-test.jar --dest bin
      ```

      (the only thihng that changed is the --dest parameter)

      And here's what I get:

      ```
      $ bin/HelloWorld/bin/HelloWorld
      Error: could not find libjava.so
      Error: Could not find Java SE Runtime Environment.
      ```

      I use Ubuntu 20.04. A colleague of mine using MacOS does not seem to have the same issue, so it seems to be system specific.

      I'm using the latest jpackage from jdk/jdk.

      See:
      https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-June/079041.html

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              asemenyuk Alexey Semenyuk
              Reporter:
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: