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

jpackage fails to populate runtime in app image but exits with 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • 26
    • 18, 19
    • tools
    • None
    • generic
    • linux

      jpackage fails to populate application image with Java runtime and
      app specific files when executed in Github but exits with "0" status indicating no error.

      >
      > Now this is somewhat puzzling for me:
      > I tried to factor out Gradle by putting the JPackage commands into a
      > separate section of the Github Actions script. So now it is invoked
      > through bash.
      >
      > No wonder, the command triggered by Gradle and the one triggered by
      > bash revealed the same result: A lot of files were missing. I verified
      > this by listing the directories through a 'find'.
      >
      > But then I followed your advice and added --verbose to the JPackage
      > command. And find lists a lot more files now.
      >
      > In case you are interested, check out
      >https://github.com/HiranChaudhuri/settlers-installer/runs/5890636608
      Thank you for sharing. I find this piece of log interesting:
      ---
      [19:28:24.553] Command [PID: -1]:
          jlink --output app/build/app-image/SettlersRemake/lib/runtime --module-path /usr/lib/jvm/temurin-17-jdk-amd64/jmods --add-modules jdk.management.jfr,java.rmi,jdk.jdi,jdk.charsets,java.xml,jdk.xml.dom,java.datatransfer,jdk.jstatd,jdk.httpserver,java.desktop,java.security.sasl,jdk.zipfs,java.base,jdk.crypto.ec,jdk.javadoc,jdk.management.agent,jdk.jshell,jdk.editpad,java.sql.rowset,jdk.jsobject,jdk.sctp,java.smartcardio,jdk.unsupported,jdk.jlink,java.security.jgss,java.compiler,jdk.nio.mapmode,jdk.dynalink,jdk.unsupported.desktop,jdk.accessibility,jdk.security.jgss,jdk.incubator.vector,java.sql,java.transaction.xa,java.logging,java.xml.crypto,jdk.jfr,jdk.crypto.cryptoki,jdk.net,jdk.random,java.naming,jdk.internal.ed,java.prefs,java.net.http,jdk.compiler,jdk.naming.rmi,jdk.internal.opt,jdk.jconsole,jdk.attach,jdk.internal.le,java.management,jdk.jdwp.agent,jdk.internal.jvmstat,jdk.incubator.foreign,java.instrument,jdk.management,jdk.security.auth,java.scripting,jdk.jdeps,jdk.jartool,jdk.jpackage,java.management.rmi,jdk.naming.dns,jdk.localedata --strip-native-commands --strip-debug --no-man-pages --no-header-files
      ---
      It is not quite right that pid of jlink invocation is reported as "-1". jlnk fills runtime directory in app image. Something if off here, invocation of jlink in non-verbose mode fails. In the verbose mode, jpackage saves command lines and output of all external tools it invokes and prints saved data to the console.

      Follow https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-April/087851.html for more details.

            asemenyuk Alexey Semenyuk
            asemenyuk Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: