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

jpackage app launcher doesn't work with GraalVM

XMLWordPrintable

    • generic
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      Ubuntu 19.04 (via VirtualBox)
      jdk 16.0.1
      GraalVM 11 (21.1.0)

      A DESCRIPTION OF THE PROBLEM :
      GraalVM places it's jli lib where the jpackage app launcher does not find it and the application launch fails.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a jpackage application using the GraalVM using --runtime-image
      --runtime-image '/home/mjh/Downloads/graalvm-ce-java11-21.1.0

      Try to launch the application and it fails.

      Looking at the application log shows...
      Failed to find JVM in "/opt/halfpipe-graal11/lib/runtime" directory.

      The jpackage source for AppLauncher.cpp includes...

          if (jvmLibNameEntry == jvmLibNames.end()) {
              JP_THROW(tstrings::any() << "Failed to find JVM in \""
                  << runtimePath
                  << "\" directory.");
          }

      Comparing a successful jdk application and the Graal one shows the location for libjli.so is different like...
      jdk
      /opt/halfpipe/lib/runtime/lib/libjli.so
      graal
      /opt/halfpipe-graal11/lib/runtime/lib/jli/libjli.so

      For Graal it is in a nested directory.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The application launches
      ACTUAL -
      The application fails to launch

      ---------- BEGIN SOURCE ----------
      Simply download the GraalVM JDK and verify the different layout. Build an application and verify it doesn't launch if you want.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Creating a symlink for libjli.so in the usual place for the downloaded JDK works. A .deb created with that installs a launch-able application. From the lib directory I did...

      ln -s jli/libjli.so

      FREQUENCY : always


        1. Test.java
          0.6 kB
        2. jpackage2.txt
          0.2 kB
        3. jpackage1.txt
          0.1 kB

            asemenyuk Alexey Semenyuk
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: